diff --git a/src/main/java/device/usbPlayer/UsbPlayer.java b/src/main/java/device/usbPlayer/UsbPlayer.java index dadba47..4be2046 100644 --- a/src/main/java/device/usbPlayer/UsbPlayer.java +++ b/src/main/java/device/usbPlayer/UsbPlayer.java @@ -183,4 +183,8 @@ public class UsbPlayer implements Device { } + public int findSong(String song){ + return -1; + } + } diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index 03c5b2c..c285d79 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -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 FindSongOptions() { + UsbPlayer up1 = new UsbPlayer(); + + return Stream.of( + Arguments.of("The song is not in the Album", up1, -1) + + ); + } + } \ No newline at end of file