|
|
@ -433,12 +433,14 @@ class UsbPlayerTest { |
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("muteOptions") |
|
|
|
void muteTest(String testName, UsbPlayer inputUSB, String expectedResult,String testName2) { |
|
|
|
|
|
|
|
void muteTest(String testName, UsbPlayer inputUSB, String expectedResult,String testName2,String testName3) { |
|
|
|
int prevSound = inputUSB.getLautstaerke(); |
|
|
|
String isMuted = inputUSB.mute(); |
|
|
|
assertThat(isMuted).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
//Second case |
|
|
|
assertThat(inputUSB.getLautstaerke()).describedAs(testName2).isEqualTo(0); |
|
|
|
//third case |
|
|
|
assertThat(inputUSB.soundWas).describedAs(testName3).isEqualTo(prevSound); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -451,7 +453,7 @@ class UsbPlayerTest { |
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("The Sound is muted ", up1,"muted","Sound level is 0") |
|
|
|
Arguments.of("The Sound is muted ", up1,"muted","Sound level is 0","previous sound level is saved ") |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|