|
|
@ -85,4 +85,20 @@ class testProgramm { |
|
|
|
double result = 15/10; |
|
|
|
assertEquals(1, result, 0); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@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()); |
|
|
|
} |
|
|
|
} |