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.

ZahlenfilterTest.java 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. package Praktikum03;
  2. import org.junit.jupiter.api.Test;
  3. import static org.junit.jupiter.api.Assertions.*;
  4. class ZahlenfilterTest {
  5. @Test
  6. void filter() {
  7. }
  8. @Test
  9. void checkDivisibleBy5() {
  10. int i = 15;
  11. boolean result = Zahlenfilter.checkDivisibleBy5(i);
  12. assertTrue(result);
  13. }
  14. @Test
  15. void checkNotDivisibleBy5() {
  16. int i = 12;
  17. boolean result = Zahlenfilter.checkDivisibleBy5(i);
  18. assertFalse(result);
  19. }
  20. @Test
  21. void checkEndsWith9() {
  22. int i = 29;
  23. boolean result = Zahlenfilter.checkEndsWith9(i);
  24. assertTrue(result);
  25. }
  26. @Test
  27. void checkEndsNotWith9() {
  28. int i = 28;
  29. boolean result = Zahlenfilter.checkEndsWith9(i);
  30. assertFalse(result);
  31. }
  32. @Test
  33. void checkSumDivisibleBy3() {
  34. int i = 5;
  35. boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1);
  36. assertTrue(result);
  37. }
  38. @Test
  39. void checkSumNotDivisibleBy3() {
  40. int i = 3;
  41. boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1);
  42. assertFalse(result);
  43. }
  44. }