|
@ -384,6 +384,7 @@ class RadioPlayerTest { |
|
|
else if(testTyp.contains("region")) bool = testRp.getInfoText().contains("Regional playlist"); |
|
|
else if(testTyp.contains("region")) bool = testRp.getInfoText().contains("Regional playlist"); |
|
|
else if(testTyp.contains("saved")) bool = testRp.getInfoText().contains("Saved playlist"); |
|
|
else if(testTyp.contains("saved")) bool = testRp.getInfoText().contains("Saved playlist"); |
|
|
else if(testTyp.contains("savedNum")) bool = testRp.getInfoText().contains(("0") + testRp.savedPlaylist.indexOf(testRp.playedStation) + 1); |
|
|
else if(testTyp.contains("savedNum")) bool = testRp.getInfoText().contains(("0") + testRp.savedPlaylist.indexOf(testRp.playedStation) + 1); |
|
|
|
|
|
else if(testTyp.contains("regionNum")) bool = testRp.getInfoText().contains(("0") + testRp.regionPlaylist.indexOf(testRp.playedStation) + 1); |
|
|
|
|
|
|
|
|
assertThat(bool).describedAs(testName).isEqualTo(expectedResult); |
|
|
assertThat(bool).describedAs(testName).isEqualTo(expectedResult); |
|
|
} |
|
|
} |
|
@ -396,13 +397,17 @@ class RadioPlayerTest { |
|
|
RadioPlayer rp3 = new RadioPlayer(); |
|
|
RadioPlayer rp3 = new RadioPlayer(); |
|
|
RadioPlayer rp4 = new RadioPlayer(); |
|
|
RadioPlayer rp4 = new RadioPlayer(); |
|
|
rp4.next(); |
|
|
rp4.next(); |
|
|
|
|
|
RadioPlayer rp5 = new RadioPlayer(); |
|
|
|
|
|
rp5.changeRegion("HE"); |
|
|
|
|
|
rp5.next(); |
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("Test for getInfoText is not empty or null", "null", rp, false), |
|
|
Arguments.of("Test for getInfoText is not empty or null", "null", rp, false), |
|
|
Arguments.of("Test for getInfoText contains played station", "station", rp1, true), |
|
|
Arguments.of("Test for getInfoText contains played station", "station", rp1, true), |
|
|
Arguments.of("Test for getInfoText contains regional playlist if played station is in it", "region", rp2, true), |
|
|
Arguments.of("Test for getInfoText contains regional playlist if played station is in it", "region", rp2, true), |
|
|
Arguments.of("Test for getInfoText contains saved playlist if played station is in it", "saved", rp3, true), |
|
|
Arguments.of("Test for getInfoText contains saved playlist if played station is in it", "saved", rp3, true), |
|
|
Arguments.of("Test for getInfoText contains station number in saved playlist", "savedNum", rp4, true) |
|
|
|
|
|
|
|
|
Arguments.of("Test for getInfoText contains station number in saved playlist", "savedNum", rp4, true), |
|
|
|
|
|
Arguments.of("Test for getInfoText contains station number in regional playlist", "regionNum", rp5, true) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |