Browse Source

UsbPlayerTest.GoToTest First Case

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

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

@ -201,4 +201,9 @@ public class UsbPlayer implements Device {
return index;
}
public boolean GoTo(String songName){
playTrack = songName;
return true;
}
}

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

@ -212,4 +212,22 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) {
);
}
@ParameterizedTest
@MethodSource("GoToOptions")
void GoToTest(String testName, UsbPlayer inputPlay, String expectedResult) {
String current_Track = inputPlay.getPlayTrack();
assertThat(current_Track).describedAs(testName).isEqualTo(expectedResult);
}
static Stream<Arguments> GoToOptions() {
UsbPlayer up1 = new UsbPlayer();
up1.GoTo("Musik 03.mp3");
return Stream.of(
Arguments.of("Go to Song : Musik 03.mp3 ", up1, "Musik 03.mp3")
);
}
}
Loading…
Cancel
Save