Browse Source

UsbPlayerTest.GoToFirstTest third Case

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

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

@ -212,6 +212,7 @@ public class UsbPlayer implements Device {
}
public void GoToFirst() {
//go to the first song in the list
setPlayTrack(getPlaylist().get(0));
}
}

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

@ -325,9 +325,14 @@ class UsbPlayerTest {
up2.GoToFirst();
up2.GoToFirst();
UsbPlayer up3 = new UsbPlayer();
up3.next();
up3.GoToFirst();
return Stream.of(
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))
Arguments.of("Call the function twice and it stills go to the first Song ", up2,up2.getPlaylist().get(0)),
Arguments.of("go to the next Song then back to first Song ", up3,up3.getPlaylist().get(0))
);
}

Loading…
Cancel
Save