|
|
@ -185,22 +185,29 @@ class UsbPlayerTest { |
|
|
|
|
|
|
|
static Stream<Arguments> louder_10_Options() { |
|
|
|
USB_Stick USBDrive = new USB_Stick(); |
|
|
|
//first case |
|
|
|
UsbPlayer up1 = new UsbPlayer(USBDrive); |
|
|
|
up1.Louder_10(); |
|
|
|
|
|
|
|
//Second case |
|
|
|
UsbPlayer up2 = new UsbPlayer(USBDrive); |
|
|
|
for (int i = 0; i <= 3; i++) { |
|
|
|
for (int i = 0; i < 3; i++) { |
|
|
|
up2.Louder_10(); |
|
|
|
} |
|
|
|
up2.quieter_10(); |
|
|
|
|
|
|
|
//third case |
|
|
|
UsbPlayer up3 = new UsbPlayer(USBDrive); |
|
|
|
up3.setLautstaerke(100); |
|
|
|
up3.Louder_10(); |
|
|
|
//forth case |
|
|
|
UsbPlayer up4 = new UsbPlayer(USBDrive); |
|
|
|
up4.setLautstaerke(10); |
|
|
|
up4.mute(); |
|
|
|
up4.Louder_10(); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Volume was 0, should be 10 ", up1, 10), |
|
|
|
Arguments.of("Volume was 0, should be 30 ", up2, 30), |
|
|
|
Arguments.of("Volume was 100, should stay 100 ", up3, 100) |
|
|
|
Arguments.of("Volume was 100, should stay 100 ", up3, 100), |
|
|
|
Arguments.of("Volume is muted,no change can be made ", up4, 0) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|