Browse Source

UsbPlayerTest.unmuteTest third Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
83d3c8e4c0
  1. 7
      src/test/java/device/usbPlayer/UsbPlayerTest.java

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

@ -458,13 +458,16 @@ class UsbPlayerTest {
@ParameterizedTest
@MethodSource("unmuteOptions")
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult,String testName2) {
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult,String testName2,String testName3) {
int prevSound = inputUSB.getLautstaerke();
String unMuted = inputUSB.unmute();
int currentStatusofSoundWas = inputUSB.soundWas;
//first case
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult);
//Second case
assertThat(inputUSB.getLautstaerke()).describedAs(testName2).isEqualTo(prevSound);
//third case
assertThat(inputUSB.soundWas).describedAs(testName3).isEqualTo(currentStatusofSoundWas);
}
@ -474,7 +477,7 @@ class UsbPlayerTest {
up1.unmute();
return Stream.of(
Arguments.of("The Sound is unmuted ", up1,"unmuted","Sound level has changed")
Arguments.of("The Sound is unmuted ", up1,"unmuted","Sound level has changed","previous sound level is 0")
);
}

Loading…
Cancel
Save