Browse Source

UsbPlayerTest.setPlayTrackTest first Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
95977c9ae7
  1. 21
      src/test/java/device/usbPlayer/UsbPlayerTest.java

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

@ -358,10 +358,27 @@ class UsbPlayerTest {
return Stream.of(
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 ", up1,up1.getPlaylist().get(up1.getPlaylist().size()-1)),
Arguments.of("It should go to the Last Song even after calling the function twice ", up2,up2.getPlaylist().get(up2.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))
);
}
@ParameterizedTest
@MethodSource("setPlayTrackOptions")
void setPlayTrackTest(String testName, UsbPlayer inputUSB, String expectedResult) {
String firstSong = inputUSB.getPlayTrack();
assertThat(firstSong ).describedAs(testName).isEqualTo(expectedResult);
}
static Stream<Arguments> setPlayTrackOptions() {
//first case
UsbPlayer up1 = new UsbPlayer();
up1.setPlayTrack("Musik 02.mp3");
return Stream.of(
Arguments.of("It should change the current Song ", up1,"Musik 02.mp3")
);
}
}
Loading…
Cancel
Save