Browse Source

Method mute of CDPlayer tested on checkingTheReturnValue -> ShouldReturnAString.

feature-pr-jacksonsNewFeature
JPANZO 3 years ago
parent
commit
5b1c8e9101
  1. 2
      src/main/java/device/cdPlayer/CDPlayer.java
  2. 12
      src/test/java/device/cdPlayer/CDPlayerTest.java

2
src/main/java/device/cdPlayer/CDPlayer.java

@ -120,7 +120,7 @@ public class CDPlayer implements Device {
@Override
public String unmute() {
return null;
return ("Volume unmute.");
}
@Override

12
src/test/java/device/cdPlayer/CDPlayerTest.java

@ -565,7 +565,17 @@ class CDPlayerTest {
);
}
@ParameterizedTest
@MethodSource("unmuteTestData")
void unmuteTest(String testName,String cases, CDPlayer _cdPlayer,String expectedResult) {
assertThat(_cdPlayer.unmute()).describedAs(testName).isEqualTo(expectedResult);
}
static Stream<Arguments> unmuteTestData () {
CDPlayer cdPlayer1 = new CDPlayer();
return Stream.of(
Arguments.of("[unmute() by checkingTheReturnValue ] => ShouldReturnAString", "Case1", cdPlayer1, "Volume unmute.")
);
}
}
Loading…
Cancel
Save