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 @ParameterizedTest
@MethodSource("unmuteOptions") @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(); int prevSound = inputUSB.getLautstaerke();
String unMuted = inputUSB.unmute(); String unMuted = inputUSB.unmute();
int currentStatusofSoundWas = inputUSB.soundWas;
//first case //first case
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult); assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult);
//Second case //Second case
assertThat(inputUSB.getLautstaerke()).describedAs(testName2).isEqualTo(prevSound); assertThat(inputUSB.getLautstaerke()).describedAs(testName2).isEqualTo(prevSound);
//third case
assertThat(inputUSB.soundWas).describedAs(testName3).isEqualTo(currentStatusofSoundWas);
} }
@ -474,7 +477,7 @@ class UsbPlayerTest {
up1.unmute(); up1.unmute();
return Stream.of( 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