예제 #1
0
파일: UnitTests.cs 프로젝트: amaran7/TP-CC
        public void TestShowResult()
        {
            ied.When(x => x.startDetection(Arg.Any <Bitmap>())).Do(x => { });
            ied.getImage().Returns <Bitmap>(imageAvecLaplacian5x5);

            program.applyDetection(null);
        }
예제 #2
0
        public void applyDetection(Bitmap img)
        {
            try
            {
                if (img != null)
                {
                    edgeDetection.startDetection(img);
                }
                else
                {
                    edgeDetection.startDetection(originalImage);
                }

                resultImage = edgeDetection.getImage();
            }catch (Exception e)
            {
                Console.WriteLine("EdgeDetection Error");
                resultImage = originalImage;
            }

            applyResult(resultImage, "save");
        }