|
|
@ -382,6 +382,7 @@ class RadioPlayerTest { |
|
|
|
if(testTyp.equals("null")) bool = Strings.isNullOrEmpty(testRp.getInfoText()); |
|
|
|
else if(testTyp.contains("station")) bool = testRp.getInfoText().contains(testRp.playedStation); |
|
|
|
else if(testTyp.contains("region")) bool = testRp.getInfoText().contains("Regional playlist"); |
|
|
|
else if(testTyp.contains("saved")) bool = testRp.getInfoText().contains("Saved playlist"); |
|
|
|
|
|
|
|
assertThat(bool).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
@ -391,11 +392,13 @@ class RadioPlayerTest { |
|
|
|
RadioPlayer rp1 = new RadioPlayer(); |
|
|
|
RadioPlayer rp2 = new RadioPlayer(); |
|
|
|
rp2.changeRegion("BY"); |
|
|
|
RadioPlayer rp3 = new RadioPlayer(); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
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 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) |
|
|
|
); |
|
|
|
} |
|
|
|
} |