|
|
@ -171,11 +171,24 @@ class RadioPlayerTest { |
|
|
|
@Test |
|
|
|
void getOptions() { |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
@Test |
|
|
|
void chooseOption() { |
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("chooseItemOptions") |
|
|
|
void testChooseItem(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|
String playedStation = testRp.playedStation; |
|
|
|
assertThat(playedStation).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
*/ |
|
|
|
|
|
|
|
static Stream<Arguments> chooseItemOptions() { |
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
rp.chooseItem(2); |
|
|
|
|
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Test select station to play with nr isn`t bigger than playlist size", rp, "Teddy") |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("testPlayOptions") |
|
|
|
void testPlay(String testName, RadioPlayer testRp, String expectedResult) { |
|
|
|