|
@ -447,15 +447,35 @@ class UsbPlayerTest { |
|
|
static Stream<Arguments> muteOptions() { |
|
|
static Stream<Arguments> muteOptions() { |
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
|
|
|
|
|
//first case |
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
up1.mute(); |
|
|
up1.mute(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("The Sound is muted ", up1,"muted","Sound level is 0","previous sound level is saved ") |
|
|
Arguments.of("The Sound is muted ", up1,"muted","Sound level is 0","previous sound level is saved ") |
|
|
|
|
|
|
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
|
|
@MethodSource("unmuteOptions") |
|
|
|
|
|
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult) { |
|
|
|
|
|
|
|
|
|
|
|
String unMuted = inputUSB.unmute(); |
|
|
|
|
|
//first case |
|
|
|
|
|
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static Stream<Arguments> unmuteOptions() { |
|
|
|
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
|
|
|
|
|
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
|
|
|
up1.unmute(); |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
|
|
Arguments.of("The Sound is unmuted ", up1,"unmuted") |
|
|
|
|
|
|
|
|
|
|
|
); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |