|
|
@ -547,13 +547,21 @@ class CDPlayerTest { |
|
|
|
_cdPlayer.mute(); |
|
|
|
assertThat(_cdPlayer.getVolume()).describedAs(testName).isEqualTo(0); |
|
|
|
} |
|
|
|
if(cases.equals("Case4")) { |
|
|
|
for (int i = 0; i < 5; i++) { |
|
|
|
_cdPlayer.louder(); |
|
|
|
} |
|
|
|
_cdPlayer.mute(); |
|
|
|
assertThat(_cdPlayer.getOldVolume()).describedAs(testName).isEqualTo(5); |
|
|
|
} |
|
|
|
} |
|
|
|
static Stream<Arguments> muteTestData () { |
|
|
|
CDPlayer cdPlayer1 = new CDPlayer(); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("[mute() by checkingTheReturnValue ] => ShouldReturnAString", "Case1", cdPlayer1, "Volume muted."), |
|
|
|
Arguments.of("[mute() by checkingTheEffectAfterRun ] => VariableMutedShouldBeTrue", "Case2", cdPlayer1, "Volume muted."), |
|
|
|
Arguments.of("[mute() after 2x louder() by checkingTheVolume] => VolumeShouldBeSetTo0", "Case3", cdPlayer1, "Volume muted.") |
|
|
|
Arguments.of("[mute() after 2x louder() by checkingTheVolume] => VolumeShouldBeSetTo0", "Case3", cdPlayer1, "Volume muted."), |
|
|
|
Arguments.of("[mute() after 5x louder() by checkingTheSavedOldVolume] => getOldVolumeShouldReturns_5", "Case4", cdPlayer1, "Volume muted.") |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|