diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index bf403d6..d0dd39d 100644 --- a/src/main/java/device/usbPlayer/UsbPlayer.java +++ b/src/main/java/device/usbPlayer/UsbPlayer.java @@ -222,6 +222,7 @@ public class UsbPlayer implements Device { } public void GoToLast() { + //go to the last Song setPlayTrack("Musik 03.mp3"); } } diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index 042a4a9..b649a16 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -348,9 +348,15 @@ class UsbPlayerTest { UsbPlayer up1 = new UsbPlayer(); up1.GoToLast(); + UsbPlayer up2 = new UsbPlayer(); + up2.GoToLast(); + up2.GoToLast(); + + return Stream.of( - Arguments.of("It should go to the first Song ", up1,"Musik 03.mp3") + Arguments.of("It should go to the Last Song ", up1,"Musik 03.mp3"), + Arguments.of("It should go to the Last Song even after calling the function twice ", up2,"Musik 03.mp3") ); }