|
|
@ -401,6 +401,12 @@ class CDPlayerTest { |
|
|
|
Exception newException = assertThrows(exception.getClass(), () -> _cdPlayer.loadCDWechseler(cd)); |
|
|
|
assertEquals(FormatNotSupportedException.class, newException.getClass()); |
|
|
|
} |
|
|
|
if(cases.equals("Case3")) { |
|
|
|
_cdPlayer.changePlaySource(); |
|
|
|
_cdPlayer.loadCDWechseler(cd); |
|
|
|
int length=_cdPlayer.getCdWechseler().getCDList().size(); |
|
|
|
assertThat(length).describedAs(testName).isEqualTo(1); |
|
|
|
} |
|
|
|
} |
|
|
|
static Stream<Arguments> loadCDWechselerData () { |
|
|
|
CDPlayer cdPlayer1 = new CDPlayer(); |
|
|
@ -411,7 +417,8 @@ class CDPlayerTest { |
|
|
|
CD DVD=new CD("DVD",videoPlayList); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("[loadCDWechseler() by notRunning=CDWechseler ] => shouldThrowAnException", "Case1", cdPlayer1,audioCD1,new CDWechselerNotRunningException()), |
|
|
|
Arguments.of("[loadCDWechseler() by WrongCDFormat ] => shouldThrowAnException", "Case2", cdPlayer1,DVD,new FormatNotSupportedException()) |
|
|
|
Arguments.of("[loadCDWechseler() by WrongCDFormat ] => shouldThrowAnException", "Case2", cdPlayer1,DVD,new FormatNotSupportedException()), |
|
|
|
Arguments.of("[loadCDWechseler() by leadingFirstCD ] => CDListOfCDWechselerShouldHaveLength1", "Case3", cdPlayer1,audioCD1,null) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|