public void TestShowResult() { ied.When(x => x.startDetection(Arg.Any <Bitmap>())).Do(x => { }); ied.getImage().Returns <Bitmap>(imageAvecLaplacian5x5); program.applyDetection(null); }
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"); }