|
@ -190,4 +190,20 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("FindSongOptions") |
|
|
|
|
|
void findSongTest(String testName, UsbPlayer inputPlay, int expectedResult) { |
|
|
|
|
|
int songLocation = inputPlay.findSong("song 4"); |
|
|
|
|
|
assertThat(songLocation).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> FindSongOptions() { |
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("The song is not in the Album", up1, -1) |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |