From 9bf794bbea8749163410d6992190606f04c4bad1 Mon Sep 17 00:00:00 2001 From: sahar Date: Wed, 16 Feb 2022 00:03:45 +0100 Subject: [PATCH] UsbPlayerTest.GoToLastTest fiSecond Case --- src/main/java/device/usbPlayer/UsbPlayer.java | 1 + src/test/java/device/usbPlayer/UsbPlayerTest.java | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) 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") ); }