Esempio n. 1
0
        public void ConvolutionFilterTestOfExceptionWithMatrix()
        {
            //Substitute for ManagerEdge
            InterfaceEdge edgeInterface = Substitute.For <ManagerEdge>();
            //Getting the original image to be sent
            Bitmap originalBitmap = RetrieveImage.RetrieveOriginalPicture();
            //Bitmap bitmapForVerification retrieved using the ConvolutionFilter method with a matrix null
            Bitmap filteredBitmap = edgeInterface.ConvolutionFilter(originalBitmap, null, 1.0, 0);

            Assert.AreEqual(null, filteredBitmap);
        }
Esempio n. 2
0
        public void ConvolutionFilterTestOfExceptionWithBitmap()
        {
            //Substitute for ManagerEdge
            InterfaceEdge edgeInterface = Substitute.For <ManagerEdge>();
            //Getting the original image to be sent
            Bitmap originalBitmap = null;
            //Bitmap bitmapForVerification retrieved using the ConvolutionFilter method with a originalBitmap null
            Bitmap filteredBitmap = edgeInterface.ConvolutionFilter(originalBitmap, new double[, ]
            {
                { -1, -1, -1, },
                { -1, 8, -1, },
                { -1, -1, -1, },
            }, 1.0, 0);

            Assert.AreEqual(null, filteredBitmap);
        }