|
|
@ -232,12 +232,18 @@ class CDPlayerTest { |
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("getOptionsTestData") |
|
|
|
void getOptionsTest(String testName,String testDirection, CDPlayer _cdPlayer, String expectedResult){ |
|
|
|
assertThat(_cdPlayer.getOptions()).describedAs(testName).isNotEqualTo(null); |
|
|
|
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(): shouldNotReturnsNull] => ReturnValueNotNull", "ReturnValueNotNull", cdPlayer1,null) |
|
|
|
Arguments.of("[getOptions(): shouldNotReturnNull] => ReturnValueNotNull", "ReturnValueNotNull", cdPlayer1,null), |
|
|
|
Arguments.of("[getOptions(): shouldReturnAnArrayWithLengthGreaterThen0] => ArrayLengthGreaterThen0", "ArrayLengthGreaterThen0", cdPlayer1,null) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|