|
@ -232,12 +232,18 @@ class CDPlayerTest { |
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
@MethodSource("getOptionsTestData") |
|
|
@MethodSource("getOptionsTestData") |
|
|
void getOptionsTest(String testName,String testDirection, CDPlayer _cdPlayer, String expectedResult){ |
|
|
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 () { |
|
|
static Stream<Arguments> getOptionsTestData () { |
|
|
CDPlayer cdPlayer1 = new CDPlayer(); |
|
|
CDPlayer cdPlayer1 = new CDPlayer(); |
|
|
return Stream.of( |
|
|
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) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|