From: git Date: Thu, 29 Jun 2017 10:16:42 +0000 (+0200) Subject: updated test X-Git-Url: http://git.risc.jku.at/gitweb/?a=commitdiff_plain;h=fdd435314a166de50ecab592abed357ca3f60e84;p=ipau%2FColorBlackWhiteConversion.git updated test --- diff --git a/Conversion_CYC/TestColor.java b/Conversion_CYC/TestColor.java index 8a6e7d0..7f1fbe6 100644 --- a/Conversion_CYC/TestColor.java +++ b/Conversion_CYC/TestColor.java @@ -19,6 +19,7 @@ public class TestColor { BufferedImage input_image; BufferedImage output_image; + BufferedImage output_image_gray; BufferedImage image; int width; int height; @@ -27,9 +28,7 @@ public class TestColor { public void setUp() throws Exception { LoadFile file = new LoadFile(); input_image = file.Load_File("test.jpg"); - - BlackandWhite bw_image = new BlackandWhite(); - output_image = bw_image.Black_and_White(input_image); + } /** @@ -41,7 +40,9 @@ public class TestColor { @Test public void testBlackandWhite() { - + BlackandWhite bw_image = new BlackandWhite(); + output_image = bw_image.Black_and_White(input_image); + try { width = output_image.getWidth(); @@ -65,5 +66,30 @@ public class TestColor { } catch (Exception e) {} } - + @Test + public void testGray() { + GrayScale g_image = new GrayScale(); + output_image_gray = g_image.Gray_Scale(input_image); + try { + + width = output_image_gray.getWidth(); + height = output_image_gray.getHeight(); + + for(int i=0; i