diff --git a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
index ac5de24a4..7dd09e078 100644
--- a/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
+++ b/src/ImageProcessor.UnitTests/ImageFactoryUnitTests.cs
@@ -124,6 +124,42 @@ namespace ImageProcessor.UnitTests
}
}
+ ///
+ /// Tests that a filter is really applied by checking that the image is modified
+ ///
+ [Test]
+ public void TestApplyEffectBlur()
+ {
+ foreach (var fileName in ListInputFiles())
+ {
+ using (var imageFactory = new ImageFactory())
+ {
+ imageFactory.Load(fileName);
+ var original = imageFactory.Image.Clone();
+ imageFactory.GaussianBlur(5);
+ Assert.AreNotEqual(original, imageFactory.Image);
+ }
+ }
+ }
+
+ ///
+ /// Tests that a filter is really applied by checking that the image is modified
+ ///
+ [Test]
+ public void TestApplyEffectBlurWithLayer()
+ {
+ foreach (var fileName in ListInputFiles())
+ {
+ using (var imageFactory = new ImageFactory())
+ {
+ imageFactory.Load(fileName);
+ var original = imageFactory.Image.Clone();
+ imageFactory.GaussianBlur(new Imaging.GaussianLayer() { Sigma = 10, Size = 5, Threshold = 2 });
+ Assert.AreNotEqual(original, imageFactory.Image);
+ }
+ }
+ }
+
///
/// Tests that all filters can be applied
///
@@ -242,5 +278,31 @@ namespace ImageProcessor.UnitTests
}
}
}
+
+ ///
+ /// Tests that the image is flipped
+ ///
+ [Test]
+ public void TestFlip()
+ {
+ foreach (var fileName in ListInputFiles())
+ {
+ using (var imageFactory = new ImageFactory())
+ {
+ imageFactory.Load(fileName);
+ var original = (System.Drawing.Image)imageFactory.Image.Clone();
+ imageFactory.Flip(true);
+ Assert.AreNotEqual(original, imageFactory.Image);
+ Assert.AreEqual(original.Width, imageFactory.Image.Width);
+ Assert.AreEqual(original.Height, imageFactory.Image.Height);
+ imageFactory.Reset();
+
+ imageFactory.Flip(false);
+ Assert.AreNotEqual(original, imageFactory.Image);
+ Assert.AreEqual(original.Width, imageFactory.Image.Width);
+ Assert.AreEqual(original.Height, imageFactory.Image.Height);
+ }
+ }
+ }
}
}
\ No newline at end of file