|
@ -542,6 +542,23 @@ class UsbPlayerTest { |
|
|
Arguments.of("The Sound is unmuted ", up1,"unmuted","Sound level has changed","previous sound level is 0") |
|
|
Arguments.of("The Sound is unmuted ", up1,"unmuted","Sound level has changed","previous sound level is 0") |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
|
|
|
}//chooseItem |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("chooseItem") |
|
|
|
|
|
void chooseItemTest(String testName, String inputSong, String expectedResult) { |
|
|
|
|
|
//int volumeNum = inputPlay.getLautstaerke(); |
|
|
|
|
|
assertThat(inputSong).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> chooseItem() { |
|
|
|
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
|
|
//first case |
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("An Item from the Album was chosen ", up1.chooseItem(0), "Musik 01.mp3") |
|
|
|
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |