|
@ -309,5 +309,22 @@ class UsbPlayerTest { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
//GoToFirst() |
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("GoToFirstOptions") |
|
|
|
|
|
void GoToFirstTest(String testName, UsbPlayer inputUSB, String expectedResult) { |
|
|
|
|
|
String firstSong = inputUSB.getPlayTrack(); |
|
|
|
|
|
assertThat(firstSong ).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> GoToFirstOptions() { |
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(); |
|
|
|
|
|
up1.GoToFirst(); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("It should go to the first Song ", up1,up1.getPlaylist().get(0)) |
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |