From 62c89d35e013365466450b7c814f830749edd576 Mon Sep 17 00:00:00 2001 From: sahar Date: Fri, 18 Feb 2022 00:14:14 +0100 Subject: [PATCH] UsbPlayerTest.quieter_10_Test Fifth Case --- src/test/java/device/usbPlayer/UsbPlayerTest.java | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index f222f15..c22f806 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -227,30 +227,37 @@ class UsbPlayerTest { static Stream 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) ); }