You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
591 B

  1. package LernProgramm;
  2. import static org.junit.jupiter.api.Assertions.*;
  3. import java.io.ByteArrayInputStream;
  4. import java.io.ByteArrayOutputStream;
  5. import java.io.InputStream;
  6. import java.io.PrintStream;
  7. import org.junit.jupiter.api.Test;
  8. class testProgramm {
  9. @Test
  10. void test() {
  11. assertTrue(true);
  12. }
  13. @Test
  14. public void testPrimBis100() {
  15. ByteArrayOutputStream out = new ByteArrayOutputStream();
  16. System.setOut(new PrintStream(out));
  17. ProgrammMain.PrimBis100();
  18. 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());
  19. }
  20. }