diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index 1986521..b44afb5 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -358,10 +358,27 @@ class UsbPlayerTest { return Stream.of( - Arguments.of("It should go to the Last Song ", up1,up3.getPlaylist().get(up3.getPlaylist().size()-1)), - Arguments.of("It should go to the Last Song even after calling the function twice ", up2,up3.getPlaylist().get(up3.getPlaylist().size()-1)), + Arguments.of("It should go to the Last Song ", up1,up1.getPlaylist().get(up1.getPlaylist().size()-1)), + Arguments.of("It should go to the Last Song even after calling the function twice ", up2,up2.getPlaylist().get(up2.getPlaylist().size()-1)), Arguments.of("It should go to the Last Song even changing the current song ", up3,up3.getPlaylist().get(up3.getPlaylist().size()-1)) ); } + @ParameterizedTest + @MethodSource("setPlayTrackOptions") + void setPlayTrackTest(String testName, UsbPlayer inputUSB, String expectedResult) { + String firstSong = inputUSB.getPlayTrack(); + assertThat(firstSong ).describedAs(testName).isEqualTo(expectedResult); + } + + static Stream setPlayTrackOptions() { + //first case + UsbPlayer up1 = new UsbPlayer(); + up1.setPlayTrack("Musik 02.mp3"); + + return Stream.of( + Arguments.of("It should change the current Song ", up1,"Musik 02.mp3") + ); + } + } \ No newline at end of file