diff --git a/LernProgramm/testProgramm.java b/LernProgramm/testProgramm.java index a8be895..e1a9152 100644 --- a/LernProgramm/testProgramm.java +++ b/LernProgramm/testProgramm.java @@ -101,6 +101,18 @@ class testProgramm { } +@Test + public void testFakultaetWithZero() { + String input = "0\n"; + ByteArrayInputStream in = new ByteArrayInputStream(input.getBytes()); + System.setIn(in); + + ByteArrayOutputStream out = new ByteArrayOutputStream(); + System.setOut(new PrintStream(out)); + + FunktionenAusgelagert.Fakultaet(); + + assertTrue(true);