|
@ -265,4 +265,21 @@ class RadioPlayerTest { |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("changeOrderInSavedPlaylistOptions") |
|
|
|
|
|
void testChangeOrderInSavedPlaylist(String testName, RadioPlayer testRp, int nr, String expectedResult) { |
|
|
|
|
|
String savedStation = testRp.savedPlaylist.get(nr); |
|
|
|
|
|
assertThat(savedStation).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> changeOrderInSavedPlaylistOptions() { |
|
|
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
|
|
rp.next(); |
|
|
|
|
|
rp.changeOrderInSavedPlaylist(1); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("Test for change order in saved playlist with nr isn`t than playlist size", rp, 0, "Teddy") |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
} |
|
|
} |