|
|
@ -46,18 +46,20 @@ class RadioPlayerTest { |
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("changeRegionOptions") |
|
|
|
void changeFrequencyTest(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|
void changeRegionTest(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|
String station = testRp.playTrack; |
|
|
|
assertThat(station).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
static Stream<Arguments> changeRegionOptions() { |
|
|
|
RadioPlayer rp1 = new RadioPlayer(); |
|
|
|
rp1.changeRegion(); |
|
|
|
RadioPlayer rp2 = new RadioPlayer(); |
|
|
|
rp1.changeRegion("Bayern"); |
|
|
|
rp2.changeRegion("Hessen"); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Test change Region to Bayern", rp1, "Antenne Bayern") |
|
|
|
|
|
|
|
Arguments.of("Test change Region to Bayern", rp1, "Antenne Bayern"), |
|
|
|
Arguments.of("Test change Region to Hessen", rp2, "Hit Radio FFH") |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
@ -84,9 +86,9 @@ class RadioPlayerTest { |
|
|
|
rp2.prev(); |
|
|
|
rp3.prev(); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Next Station Test", rp1, "Radio Teddy"), |
|
|
|
Arguments.of("Prev Station Test", rp2, "Radio YouFM"), |
|
|
|
Arguments.of("Prev works on first Station ", rp3, "Radio MegaHits") |
|
|
|
Arguments.of("Next Station Test", rp1, "Teddy"), |
|
|
|
Arguments.of("Prev Station Test", rp2, "YouFM"), |
|
|
|
Arguments.of("Prev works on first Station ", rp3, "MegaHits") |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|