|
|
@ -185,9 +185,12 @@ class RadioPlayerTest { |
|
|
|
|
|
|
|
static Stream<Arguments> testPlayOptions() { |
|
|
|
RadioPlayer rp1 = new RadioPlayer(); |
|
|
|
RadioPlayer rp2 = new RadioPlayer(); |
|
|
|
rp2.changeRegion("BY"); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Test for playing first station on saved playlist", rp1, "Radio is playing station: 01 YouFM") |
|
|
|
Arguments.of("Test for playing first station on saved playlist", rp1, "Radio is playing station: 01 YouFM from saved playlist"), |
|
|
|
Arguments.of("Test for playing first station on regional playlist", rp2, "Radio is playing station: 01 Antenne Bayern from regional playlist") |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
@ -195,7 +198,7 @@ class RadioPlayerTest { |
|
|
|
@MethodSource("saveStationOptions") |
|
|
|
void testSaveStation(String testName, RadioPlayer testRp,String testTyp, String expectedResult) { |
|
|
|
String savedStation; |
|
|
|
if (testTyp == "normal") { |
|
|
|
if (testTyp.equals("normal")) { |
|
|
|
savedStation = testRp.savedPlaylist.get(testRp.savedPlaylist.size() - 1);} |
|
|
|
else savedStation = Boolean.toString(testRp.regionPlaylist.isEmpty()); |
|
|
|
assertThat(savedStation).describedAs(testName).isEqualTo(expectedResult); |
|
|
|