|
@ -244,4 +244,21 @@ class RadioPlayerTest { |
|
|
Arguments.of("Test for not delete station in saved playlist if this is the last station", rp1, "noDelete", true) |
|
|
Arguments.of("Test for not delete station in saved playlist if this is the last station", rp1, "noDelete", true) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("changeToSavedPlaylistOptions") |
|
|
|
|
|
void testChangeToSavedPlaylist(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|
|
|
String savedStation = testRp.playedStation; |
|
|
|
|
|
assertThat(savedStation).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> changeToSavedPlaylistOptions() { |
|
|
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
|
|
rp.changeToSavedPlaylist(); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("Test for change to saved playlist when you already in saved playlist", rp, "YouFM") |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
} |