Browse Source

UsbPlayerTest.quieter_10_Test Fifth Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
62c89d35e0
  1. 15
      src/test/java/device/usbPlayer/UsbPlayerTest.java

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

@ -227,30 +227,37 @@ class UsbPlayerTest {
static Stream<Arguments> quieter_10_Options() {
USB_Stick USBDrive = new USB_Stick();
//first case
UsbPlayer up1 = new UsbPlayer(USBDrive);
up1.setLautstaerke(10);
up1.quieter_10();
//second case
UsbPlayer up2 = new UsbPlayer(USBDrive);
up2.setLautstaerke(50);
for (int i = 0; i < 3; i++) {
up2.quieter_10();
}
//third case
UsbPlayer up3 = new UsbPlayer(USBDrive);
up3.quieter_10();
//forth case
UsbPlayer up4 = new UsbPlayer(USBDrive);
up4.setLautstaerke(11);
up4.mute();
up4.quieter_10();
//fifth case
UsbPlayer up5 = new UsbPlayer(USBDrive);
up5.setLautstaerke(11);
up5.mute();
up5.unmute();
up5.quieter_10();
return Stream.of(
Arguments.of("Volume was 10, should be 0 ", up1, 0),
Arguments.of("Volume was 50, should be 20 ", up2, 20),
Arguments.of("Volume was 0, should stay 0 ", up3, 0),
Arguments.of("Volume is muted,no change can be made ", up4, 0)
Arguments.of("Volume is muted,no change can be made ", up4, 0),
Arguments.of("Volume is unmuted,a change has been made ", up5, 1)
);
}

Loading…
Cancel
Save