Browse Source

UsbPlayerTest.GoToLastTest third Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
945bb15abf
  1. 2
      src/main/java/device/usbPlayer/UsbPlayer.java
  2. 8
      src/test/java/device/usbPlayer/UsbPlayerTest.java

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

@ -223,6 +223,6 @@ public class UsbPlayer implements Device {
public void GoToLast() {
//go to the last Song
setPlayTrack("Musik 03.mp3");
setPlayTrack(this.getPlaylist().get(this.getPlaylist().size()-1));
}
}

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

@ -352,11 +352,15 @@ class UsbPlayerTest {
up2.GoToLast();
up2.GoToLast();
UsbPlayer up3 = new UsbPlayer();
up3.next();
up3.GoToLast();
return Stream.of(
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")
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 even changing the current song ", up3,up3.getPlaylist().get(up3.getPlaylist().size()-1))
);
}
Loading…
Cancel
Save