|
|
@ -44,35 +44,25 @@ class RadioPlayerTest { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
/* |
|
|
|
@Test |
|
|
|
void louder() { |
|
|
|
rp.setLautstaerke(0); |
|
|
|
rp.louder(); |
|
|
|
assertThat(rp.getLautstaerke()).isEqualTo(1); |
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("changeRegionOptions") |
|
|
|
void changeFrequencyTest(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|
String station = testRp.playTrack; |
|
|
|
assertThat(station).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
@Test |
|
|
|
void louderMax() { |
|
|
|
rp.setLautstaerke(100); |
|
|
|
rp.louder(); |
|
|
|
assertThat(rp.getLautstaerke()).isEqualTo(100); |
|
|
|
} |
|
|
|
static Stream<Arguments> changeRegionOptions() { |
|
|
|
RadioPlayer rp1 = new RadioPlayer(); |
|
|
|
rp1.changeRegion(); |
|
|
|
|
|
|
|
@Test |
|
|
|
void quieter() { |
|
|
|
rp.setLautstaerke(1); |
|
|
|
rp.quieter(); |
|
|
|
assertThat(rp.getLautstaerke()).isEqualTo(0); |
|
|
|
} |
|
|
|
@Test |
|
|
|
void quieterMax() { |
|
|
|
rp.setLautstaerke(0); |
|
|
|
rp.quieter(); |
|
|
|
assertThat(rp.getLautstaerke()).isEqualTo(0); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Test change Region to Bayern", rp1, "Antenne Bayern") |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
Jenkins config test |
|
|
|
|
|
|
|
/* |
|
|
|
@Test |
|
|
|
void getVolume() { |
|
|
|
} |
|
|
|