Browse Source

UsbPlayerTest.GoToFirstTest Second Case

feature.pr-USB-NewTest
sahar 3 years ago
parent
commit
e21ac14932
  1. 2
      src/main/java/device/usbPlayer/UsbPlayer.java
  2. 7
      src/test/java/device/usbPlayer/UsbPlayerTest.java

2
src/main/java/device/usbPlayer/UsbPlayer.java

@ -212,6 +212,6 @@ public class UsbPlayer implements Device {
} }
public void GoToFirst() { public void GoToFirst() {
setPlayTrack("Musik 01.mp3");
setPlayTrack(getPlaylist().get(0));
} }
} }

7
src/test/java/device/usbPlayer/UsbPlayerTest.java

@ -321,8 +321,13 @@ class UsbPlayerTest {
UsbPlayer up1 = new UsbPlayer(); UsbPlayer up1 = new UsbPlayer();
up1.GoToFirst(); up1.GoToFirst();
UsbPlayer up2 = new UsbPlayer();
up2.GoToFirst();
up2.GoToFirst();
return Stream.of( return Stream.of(
Arguments.of("It should go to the first Song ", up1,up1.getPlaylist().get(0))
Arguments.of("It should go to the first Song ", up1,up1.getPlaylist().get(0)),
Arguments.of("Call the function twice and it stills go to the first Song ", up2,up2.getPlaylist().get(0))
); );
} }

Loading…
Cancel
Save