Browse Source

UsbPlayerTest.setPlayTrackTest Second Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
648baabab0
  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

@ -43,6 +43,7 @@ public class UsbPlayer implements Device {
}
public void setPlayTrack(String playTrack) {
if(this.findSong(playTrack) != -1)
this.playTrack = playTrack;
}

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

@ -376,8 +376,13 @@ class UsbPlayerTest {
UsbPlayer up1 = new UsbPlayer();
up1.setPlayTrack("Musik 02.mp3");
//Second Case
UsbPlayer up2 = new UsbPlayer();
up2.setPlayTrack("Musik 02.mp3");
return Stream.of(
Arguments.of("It should change the current Song ", up1,"Musik 02.mp3")
Arguments.of("It should change the current Song ", up1,"Musik 02.mp3"),
Arguments.of("It should change the current Song if it is in the Albume", up2,"Musik 02.mp3")
);
}
Loading…
Cancel
Save