|
@ -420,18 +420,17 @@ class RadioPlayerTest { |
|
|
} |
|
|
} |
|
|
@ParameterizedTest |
|
|
@ParameterizedTest |
|
|
@MethodSource("getOptionsOptions") |
|
|
@MethodSource("getOptionsOptions") |
|
|
void testGetOptions(String testName, RadioPlayer testRp) { |
|
|
|
|
|
|
|
|
|
|
|
assertThat(testRp.getOptions()).describedAs(testName).isNotEqualTo(null); |
|
|
|
|
|
|
|
|
void testGetOptions(String testName,String testTyp, RadioPlayer testRp) { |
|
|
|
|
|
if(testTyp.equals("notNull")) assertThat(testRp.getOptions()).describedAs(testName).isNotEqualTo(null); |
|
|
|
|
|
if(testTyp.equals("arrayLengthGreater0")) assertThat(testRp.getOptions().length).describedAs(testName).isNotEqualTo(0); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
static Stream<Arguments> getOptionsOptions() { |
|
|
static Stream<Arguments> getOptionsOptions() { |
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return Stream.of( |
|
|
return Stream.of( |
|
|
Arguments.of("returnValue of getOptions is not null", rp) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Arguments.of("returnValue of getOptions is not null", "notNull", rp), |
|
|
|
|
|
Arguments.of("should not return an empty array", "arrayLengthGreater0", rp) |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |