diff --git a/src/main/java/device/cdPlayer/CDPlayer.java b/src/main/java/device/cdPlayer/CDPlayer.java index 09e52fa..7ee9b81 100644 --- a/src/main/java/device/cdPlayer/CDPlayer.java +++ b/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 diff --git a/src/test/java/device/cdPlayer/CDPlayerTest.java b/src/test/java/device/cdPlayer/CDPlayerTest.java index 5975e17..31353b1 100644 --- a/src/test/java/device/cdPlayer/CDPlayerTest.java +++ b/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 unmuteTestData () { + CDPlayer cdPlayer1 = new CDPlayer(); + return Stream.of( + Arguments.of("[unmute() by checkingTheReturnValue ] => ShouldReturnAString", "Case1", cdPlayer1, "Volume unmute.") + ); + } } \ No newline at end of file