|
|
@ -15,5 +15,20 @@ class UebungTesten { |
|
|
|
// act |
|
|
|
String result = berechnung.convert(2); |
|
|
|
// assert |
|
|
|
assertThat(result).as("ordinary number ").isEqualTo(expected); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void convert_5_to_buzz() { |
|
|
|
String expected = "Buzz"; |
|
|
|
String result = berechnung.convert(5); |
|
|
|
assertThat(result).as("dividable by 5").isEqualTo(expected); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void gcd_15_20_to_5() { |
|
|
|
int expected = 5; |
|
|
|
int result = berechnung.gcd(7*13,7*144); |
|
|
|
assertThat(result).as("%d / %d",7*13,7*144).isEqualTo(expected); |
|
|
|
} |
|
|
|
} |