Example #1
0
        public void Laplacian5x5FilterTestOutputPicture()
        {
            //Substitute for ManagerEdge
            InterfaceEdge edgeInterface = Substitute.For <ManagerEdge>();

            Bitmap originalBitmap        = RetrieveImage.RetrieveOriginalPicture();
            Bitmap bitmapForVerification = RetrieveImage.RetrieveImageFromPath("Laplacian5x5.jpg");
            Bitmap filteredBitmap        = edgeInterface.Lalpacian5x5(new Bitmap(originalBitmap));

            Assert.IsTrue(RetrieveImage.Equals(bitmapForVerification, filteredBitmap));
        }
Example #2
0
        public void CrazyFilterTestOutputPicture()
        {
            //Substitute for the ManagerFilter
            InterfaceFilter filterInterface = Substitute.For <ManagerFilter>();

            Bitmap originalBitmap        = RetrieveImage.RetrieveOriginalPicture();
            Bitmap bitmapForVerification = RetrieveImage.RetrieveImageFromPath("Crazy.jpg");
            Bitmap filteredBitmap        = filterInterface.CrazyFilter(new Bitmap(originalBitmap));

            Assert.IsTrue(RetrieveImage.Equals(bitmapForVerification, filteredBitmap));
        }
Example #3
0
        public void TestSaveImageToComputerFormatBMP()
        {
            //Substitute for ManagerInputOutput
            InterfaceOutput outputInterface = Substitute.For <ManagerInputOutput>();

            Bitmap originalBitmapToTest = RetrieveImage.RetrieveImageFromPath("egyptBMP.bmp");

            //Name the to be saved image "TestBPM.bmp"
            outputInterface.SaveImage(originalBitmapToTest);

            Bitmap savedBitmap = RetrieveImage.RetrieveImageFromPath("TestBMP.bmp");

            Assert.IsTrue(RetrieveImage.Equals(originalBitmapToTest, savedBitmap));
        }