Browse Source

UsbPlayerTest.GoToTest Third Case

feature-pr-USB-10Louder
sahar 3 years ago
parent
commit
5a74e5ea75
  1. 2
      src/main/java/device/usbPlayer/UsbPlayer.java
  2. 6
      src/test/java/device/usbPlayer/UsbPlayerTest.java

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

@ -203,7 +203,7 @@ public class UsbPlayer implements Device {
public boolean GoTo(String songName){
if(findSong(songName) != -1){
playTrack = songName;
playTrack = getPlaylist().get(findSong(songName));//songName;
return true;
}
else

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

@ -226,9 +226,13 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) {
UsbPlayer up2 = new UsbPlayer();
up2.GoTo("Musik 04.mp3");
UsbPlayer up3 = new UsbPlayer();
up3.GoTo("Musik 02");
return Stream.of(
Arguments.of("Go to Song : Musik 03.mp3 ", up1, "Musik 03.mp3"),
Arguments.of("Go to Song that is not in the Album: Musik 04.mp3 ", up2, "Musik 01.mp3")
Arguments.of("Go to Song that is not in the Album: Musik 04.mp3 ", up2, "Musik 01.mp3"),
Arguments.of("Go to Song without writing the full Name : Musik 02 ", up3, "Musik 02.mp3")
);
}

Loading…
Cancel
Save