geändert am 21.11.2023 um 15:27
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
package Praktikum03;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
|
||||
class ZahlenfilterTest {
|
||||
|
||||
@Test
|
||||
void filter() {
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkDivisibleBy5() {
|
||||
int i = 15;
|
||||
|
||||
boolean result = Zahlenfilter.checkDivisibleBy5(i);
|
||||
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkNotDivisibleBy5() {
|
||||
int i = 12;
|
||||
|
||||
boolean result = Zahlenfilter.checkDivisibleBy5(i);
|
||||
|
||||
assertFalse(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkEndsWith9() {
|
||||
int i = 29;
|
||||
|
||||
boolean result = Zahlenfilter.checkEndsWith9(i);
|
||||
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkEndsNotWith9() {
|
||||
int i = 28;
|
||||
|
||||
boolean result = Zahlenfilter.checkEndsWith9(i);
|
||||
|
||||
assertFalse(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkSumDivisibleBy3() {
|
||||
int i = 5;
|
||||
|
||||
boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1);
|
||||
|
||||
assertTrue(result);
|
||||
}
|
||||
|
||||
@Test
|
||||
void checkSumNotDivisibleBy3() {
|
||||
int i = 3;
|
||||
|
||||
boolean result = Zahlenfilter.checkSumDivisibleBy3(i, i-1);
|
||||
|
||||
assertFalse(result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user