|
@ -342,4 +342,22 @@ class RadioPlayerTest { |
|
|
Arguments.of("Test for return regional playlist", rp1, "region", rp1.regionPlaylist.toArray(new String[0])) |
|
|
Arguments.of("Test for return regional playlist", rp1, "region", rp1.regionPlaylist.toArray(new String[0])) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("muteOptions") |
|
|
|
|
|
void testMute(String testName, RadioPlayer testRp, int expectedResult) { |
|
|
|
|
|
|
|
|
|
|
|
int volume = testRp.getVolume(); |
|
|
|
|
|
assertThat(volume).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> muteOptions() { |
|
|
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
|
|
rp.setLautstaerke(25); |
|
|
|
|
|
rp.mute(); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("Test for mute RadioPlayer if volume is actually 0", rp, 0) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
} |