Browse Source

playTest update

feature-dev-USB-PlayTest
sahar 3 years ago
parent
commit
ec0d64d1ea
  1. 31
      src/test/java/device/usbPlayer/UsbPlayerTest.java

31
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<Arguments> 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)
);
}
*/
}
Loading…
Cancel
Save