|
@ -115,6 +115,19 @@ class testProgramm { |
|
|
assertTrue(true); |
|
|
assertTrue(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Schaltjahr |
|
|
|
|
|
@Test |
|
|
|
|
|
public void testSchaltjahr() { |
|
|
|
|
|
ByteArrayInputStream in = new ByteArrayInputStream("2000\n".getBytes()); |
|
|
|
|
|
ByteArrayOutputStream out = new ByteArrayOutputStream(); |
|
|
|
|
|
System.setIn(in); |
|
|
|
|
|
System.setOut(new PrintStream(out)); |
|
|
|
|
|
|
|
|
|
|
|
FunktionenAusgelagert.schaltjahr(); |
|
|
|
|
|
|
|
|
|
|
|
assertEquals("Welches Jahr möchtest du untersuchen?\nSchaltjahr!\n", out.toString()); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|