From ec0d64d1ea5f3941f80821d0e67cf7c8fcb0c9c2 Mon Sep 17 00:00:00 2001 From: sahar Date: Tue, 8 Feb 2022 21:01:07 +0100 Subject: [PATCH] playTest update --- .../java/device/usbPlayer/UsbPlayerTest.java | 31 ++++++------------- 1 file changed, 10 insertions(+), 21 deletions(-) diff --git a/src/test/java/device/usbPlayer/UsbPlayerTest.java b/src/test/java/device/usbPlayer/UsbPlayerTest.java index 9671e73..12f199d 100644 --- a/src/test/java/device/usbPlayer/UsbPlayerTest.java +++ b/src/test/java/device/usbPlayer/UsbPlayerTest.java @@ -21,19 +21,7 @@ class UsbPlayerTest { UsbPlayer up = new UsbPlayer(); - @Test - void louder_test() { - up.setLautstaerke(40); - up.louder(); - assertThat(up.getLautstaerke()).isEqualTo(41); - } - @Test - void quieter_test() { - up.setLautstaerke(40); - up.quieter(); - assertThat(up.getLautstaerke()).isEqualTo(39); - } /* @Test void getVolume() { @@ -92,7 +80,8 @@ class UsbPlayerTest { Arguments.of("No Audio Files : ", up2, "USB : connected,working,have a list,not Audio."), Arguments.of("No list of tracks : ", up3, "USB : connected,working,have no list."), Arguments.of("connected , not working : ", up6, "USB : connected,not working."), - Arguments.of("not connected : ", up7, "not connected.") + Arguments.of("not connected : ", up7, "not connected.")); + } @ParameterizedTest @@ -103,15 +92,15 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) { } static Stream louderOptions() { - UsbPlayer up1 = new UsbPlayer(); - up1.louder(); - UsbPlayer up2 = new UsbPlayer(); - up2.setLautstaerke(100); - up2.louder(); + UsbPlayer up11 = new UsbPlayer(); + up11.louder(); + UsbPlayer up22 = new UsbPlayer(); + up22.setLautstaerke(100); + up22.louder(); return Stream.of( - Arguments.of("Volume is : 1 ", up1, 1), - Arguments.of("Volume is : 100 ", up2, 100) + Arguments.of("Volume is : 1 ", up11, 1), + Arguments.of("Volume is : 100 ", up22, 100) ); } - */ + } \ No newline at end of file