Browse Source

UsbPlayerTest.unmuteTest first Case

feature-pr-USB-otherTests
sahar 3 years ago
parent
commit
947a842f6d
  1. 3
      src/main/java/device/usbPlayer/UsbPlayer.java
  2. 24
      src/test/java/device/usbPlayer/UsbPlayerTest.java

3
src/main/java/device/usbPlayer/UsbPlayer.java

@ -191,7 +191,8 @@ public class UsbPlayer implements Device {
@Override
public String unmute() {
return null;
return "unmuted";
}

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

@ -447,15 +447,35 @@ class UsbPlayerTest {
static Stream<Arguments> muteOptions() {
USB_Stick USBDrive = new USB_Stick();
//first case
UsbPlayer up1 = new UsbPlayer(USBDrive);
up1.mute();
return Stream.of(
Arguments.of("The Sound is muted ", up1,"muted","Sound level is 0","previous sound level is saved ")
);
}
@ParameterizedTest
@MethodSource("unmuteOptions")
void unmuteTest(String testName, UsbPlayer inputUSB, String expectedResult) {
String unMuted = inputUSB.unmute();
//first case
assertThat(unMuted).describedAs(testName).isEqualTo(expectedResult);
}
static Stream<Arguments> unmuteOptions() {
USB_Stick USBDrive = new USB_Stick();
UsbPlayer up1 = new UsbPlayer(USBDrive);
up1.unmute();
return Stream.of(
Arguments.of("The Sound is unmuted ", up1,"unmuted")
);
}
}
Loading…
Cancel
Save