@ -228,4 +228,25 @@ class CDPlayerTest {
Arguments . of ( "[getActualPlayTrack() after 1x prev() starting by firstSong] => FirstSongSelected" , "StartingByFirstSong" , cdPlayer1 , 1 , cdPlayer1 . getSongByNumber ( 0 ) )
) ;
}
@ParameterizedTest
@MethodSource ( "getOptionsTestData" )
void getOptionsTest ( String testName , String testDirection , CDPlayer _cdPlayer , String expectedResult ) {
if ( testDirection . equals ( "ReturnValueNotNull" ) ) {
assertThat ( _cdPlayer . getOptions ( ) ) . describedAs ( testName ) . isNotEqualTo ( null ) ;
}
if ( testDirection . equals ( "ArrayLengthGreaterThen0" ) ) {
assertThat ( _cdPlayer . getOptions ( ) . length ) . describedAs ( testName ) . isNotEqualTo ( 0 ) ;
}
}
static Stream < Arguments > getOptionsTestData ( ) {
CDPlayer cdPlayer1 = new CDPlayer ( ) ;
return Stream . of (
Arguments . of ( "[getOptions(): shouldNotReturnNull] => ReturnValueNotNull" , "ReturnValueNotNull" , cdPlayer1 , null ) ,
Arguments . of ( "[getOptions(): shouldReturnAnArrayWithLengthGreaterThen0] => ArrayLengthGreaterThen0" , "ArrayLengthGreaterThen0" , cdPlayer1 , null )
) ;
}
}