From 0623adffadb06a732455748249bfe103ba49d443 Mon Sep 17 00:00:00 2001 From: jannisfingerhut Date: Fri, 10 Feb 2023 01:20:33 +0100 Subject: [PATCH] =?UTF-8?q?Test=20=20PrimBis100=20zum=20JUNit=20Test=20=20?= =?UTF-8?q?hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- LernProgramm/testProgramm.java | 10 +++++++++- bin/LernProgramm/testProgramm.class | Bin 498 -> 1094 bytes 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/LernProgramm/testProgramm.java b/LernProgramm/testProgramm.java index 5709e89..5a56595 100644 --- a/LernProgramm/testProgramm.java +++ b/LernProgramm/testProgramm.java @@ -16,7 +16,15 @@ class testProgramm { assertTrue( true ); } - + @Test + public void testPrimBis100() { + ByteArrayOutputStream out = new ByteArrayOutputStream(); + System.setOut(new PrintStream(out)); + + ProgrammMain.PrimBis100(); + + assertEquals("2 3 5 7 11 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 83 89 97 ", out.toString()); + } diff --git a/bin/LernProgramm/testProgramm.class b/bin/LernProgramm/testProgramm.class index 5718d639713b3bd2fb5f277dff485ab690e5f894..3bb2c479167bbcaee6fa04cb0a67785d1eb19334 100644 GIT binary patch delta 626 zcmZuu-D(p-7(J6U_rczv{0z@Mp$(TTe`ctI}vh~ zN05>i@D+Mvg9R_W@Ns+qak_2VT*$!i{haT7ob&xD{xTPT|NZe3zzcW=3Jm4rZ%ZjtlP)yEEsa`qz-y8KN zoNck<9I{S@m{&=gOW>h&#jZ#I<^ delta 44 zcmX@c@rhaB)W2Q(7#JAr7$n&lm>3x(Cr*^ysL91RnUh(Ik!i9Cb3ZEs0~3P;02`qR A@&Et;