diff --git a/src/main/java/device/radioPlayer/RadioPlayer.java b/src/main/java/device/radioPlayer/RadioPlayer.java index 12e4148..849784d 100644 --- a/src/main/java/device/radioPlayer/RadioPlayer.java +++ b/src/main/java/device/radioPlayer/RadioPlayer.java @@ -202,4 +202,7 @@ public class RadioPlayer implements Device { } else return " Last Station: 01 " + station + " canĀ“t by deleted"; } + public String changeToSavedPlaylist() { + return "You are already in saved Playlist!"; + } } diff --git a/src/test/java/device/radioPlayer/RadioPlayerTest.java b/src/test/java/device/radioPlayer/RadioPlayerTest.java index c272ddb..7ab13b0 100644 --- a/src/test/java/device/radioPlayer/RadioPlayerTest.java +++ b/src/test/java/device/radioPlayer/RadioPlayerTest.java @@ -244,4 +244,21 @@ class RadioPlayerTest { Arguments.of("Test for not delete station in saved playlist if this is the last station", rp1, "noDelete", true) ); } + + @ParameterizedTest + @MethodSource("changeToSavedPlaylistOptions") + void testChangeToSavedPlaylist(String testName, RadioPlayer testRp, String expectedResult) { + String savedStation = testRp.playedStation; + assertThat(savedStation).describedAs(testName).isEqualTo(expectedResult); + } + + static Stream changeToSavedPlaylistOptions() { + RadioPlayer rp = new RadioPlayer(); + rp.changeToSavedPlaylist(); + + return Stream.of( + Arguments.of("Test for change to saved playlist when you already in saved playlist", rp, "YouFM") + + ); + } } \ No newline at end of file