Browse Source

UsbPlayerTest.findSongTest Third Case

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

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

@ -191,7 +191,7 @@ public class UsbPlayer implements Device {
for (int j = 0; j < getPlaylist().size(); j++) {
song = getPlaylist().get(j);
songIndex=song.indexOf(songName);
songIndex=song.toLowerCase().indexOf(songName.toLowerCase());
if (songIndex != -1) {
index = j;

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

@ -206,7 +206,8 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) {
UsbPlayer up1 = new UsbPlayer();
return Stream.of(
Arguments.of("The song is not in the Album", up1.findSong("song 4"), -1),
Arguments.of("The song is in the Album", up1.findSong("Musik 02"), 1)
Arguments.of("The song is in the Album", up1.findSong("Musik 02"), 1),
Arguments.of("Name of the Song is in lower case :", up1.findSong("musik 02"), 1)
);
}

Loading…
Cancel
Save