diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
index 7cd124b19..b81cff068 100644
--- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
+++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
@@ -21,11 +21,6 @@ namespace ImageProcessor.UnitTests
[TestFixture]
public class ImageFactoryUnitTests
{
- ///
- /// The path to the binary's folder
- ///
- private readonly string localPath = Path.GetDirectoryName(new Uri(System.Reflection.Assembly.GetExecutingAssembly().CodeBase).LocalPath);
-
///
/// Lists the input files in the Images folder
///
@@ -112,5 +107,24 @@ namespace ImageProcessor.UnitTests
}
}
}
+
+ ///
+ /// Tests that the image is well resized using constraints
+ ///
+ [Test]
+ public void ApplyConstraints()
+ {
+ foreach (var fileName in ListInputFiles())
+ {
+ using (var imageFactory = new ImageFactory())
+ {
+ imageFactory.Load(fileName);
+ var original = imageFactory.Image.Clone();
+ imageFactory.Constrain(new System.Drawing.Size(200, 200));
+ var modified = imageFactory.Image.Clone();
+ Assert.AreNotEqual(original, modified);
+ }
+ }
+ }
}
}
\ No newline at end of file
diff --git a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj
index d5841e6c2..4bb9bf77f 100644
--- a/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj
+++ b/src/ImageProcessor.UnitTests/ImageProcessor.UnitTests.csproj
@@ -82,10 +82,6 @@
Images\Lighthouse.jpg
PreserveNewest
-
- Images\Penguins-200.jpg
- PreserveNewest
-
Images\Penguins-8.png
PreserveNewest