|
@ -458,22 +458,23 @@ class UsbPlayerTest { |
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
@MethodSource("unmuteOptions") |
|
|
@MethodSource("unmuteOptions") |
|
|
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult,String testName2) { |
|
|
|
|
|
int prevSound = inputUSB.getLautstaerke(); |
|
|
String unMuted = inputUSB.unmute(); |
|
|
String unMuted = inputUSB.unmute(); |
|
|
//first case |
|
|
//first case |
|
|
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult); |
|
|
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
//Second case |
|
|
|
|
|
assertThat(inputUSB.getLautstaerke()).describedAs(testName2).isEqualTo(prevSound); |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static Stream<Arguments> unmuteOptions() { |
|
|
static Stream<Arguments> unmuteOptions() { |
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
up1.unmute(); |
|
|
up1.unmute(); |
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("The Sound is unmuted ", up1,"unmuted") |
|
|
|
|
|
|
|
|
Arguments.of("The Sound is unmuted ", up1,"unmuted","Sound level has changed") |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|