|
|
@ -320,4 +320,18 @@ class RadioPlayerTest { |
|
|
|
Arguments.of("Test for change order in saved playlist with nr is than smaller than 0 at front of playlist", rp2, 0, "Teddy") |
|
|
|
); |
|
|
|
} |
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("getItemListOptions") |
|
|
|
void testGetItemList(String testName, RadioPlayer testRp, String[] expectedResult) { |
|
|
|
String[] playList = testRp.getItemList(); |
|
|
|
assertThat(playList).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
static Stream<Arguments> getItemListOptions() { |
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Test for return saved playlist", rp, rp.savedPlaylist.toArray(new String[0])) |
|
|
|
); |
|
|
|
} |
|
|
|
} |