|
|
@ -428,5 +428,20 @@ class CDPlayerTest { |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("changeToNextCDData") |
|
|
|
void changeToNextCDTest(String testName,String cases, CDPlayer _cdPlayer,Exception exception) { |
|
|
|
Exception newException = assertThrows(exception.getClass(), () -> _cdPlayer.changeToNextCD()); |
|
|
|
assertEquals(ChangeCDOnlyOnCDWechselerException.class, newException.getClass()); |
|
|
|
} |
|
|
|
static Stream<Arguments> changeToNextCDData () { |
|
|
|
CDPlayer cdPlayer1 = new CDPlayer(); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("[changeToNextCD() by CDWechselerNotSelected ] => shouldThrowAnException", "Case1", cdPlayer1,new ChangeCDOnlyOnCDWechselerException()) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |