|
|
@ -105,18 +105,27 @@ class RadioPlayerTest { |
|
|
|
@MethodSource("infoByTimeOptions") |
|
|
|
void infoByTimeInfo(String testName, RadioPlayer testRp, String testTyp, int hour, String expectedResult) { |
|
|
|
if(testTyp.equals("YouFm")) assertThat(testRp.getYouFMInfoByTime(hour)).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
if(testTyp.equals("BR3")) assertThat(testRp.getBR3InfoByTime(hour)).describedAs(testName).isEqualTo(expectedResult); |
|
|
|
} |
|
|
|
|
|
|
|
static Stream<Arguments> infoByTimeOptions() { |
|
|
|
RadioPlayer rp = new RadioPlayer(); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 5, rp.YouFMInfo[0]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 10, rp.YouFMInfo[1]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 14, rp.YouFMInfo[2]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 18, rp.YouFMInfo[3]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 20, rp.YouFMInfo[4]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 22, rp.YouFMInfo[5]), |
|
|
|
Arguments.of("Station info YouFm at 5:00 am", rp, "YouFM", 3, rp.YouFMInfo[6]) |
|
|
|
Arguments.of("Station info YouFm at 10:00 am", rp, "YouFM", 10, rp.YouFMInfo[1]), |
|
|
|
Arguments.of("Station info YouFm at 2:00 pm", rp, "YouFM", 14, rp.YouFMInfo[2]), |
|
|
|
Arguments.of("Station info YouFm at 6:00 pm", rp, "YouFM", 18, rp.YouFMInfo[3]), |
|
|
|
Arguments.of("Station info YouFm at 8:00 pm", rp, "YouFM", 20, rp.YouFMInfo[4]), |
|
|
|
Arguments.of("Station info YouFm at 10:00 pm", rp, "YouFM", 22, rp.YouFMInfo[5]), |
|
|
|
Arguments.of("Station info YouFm at 3:00 am", rp, "YouFM", 3, rp.YouFMInfo[6]), |
|
|
|
Arguments.of("Station info BR3 at 5:00 am", rp, "BR3", 5, rp.BR3Info[0]), |
|
|
|
Arguments.of("Station info BR3 at 9:00 am", rp, "BR3", 9, rp.BR3Info[1]), |
|
|
|
Arguments.of("Station info BR3 at 12:00 am", rp, "BR3", 12, rp.BR3Info[2]), |
|
|
|
Arguments.of("Station info BR3 at 1:00 pm", rp, "BR3", 13, rp.BR3Info[3]), |
|
|
|
Arguments.of("Station info BR3 at 4:00 pm", rp, "BR3", 16, rp.BR3Info[4]), |
|
|
|
Arguments.of("Station info BR3 at 7:00 pm", rp, "BR3", 19, rp.BR3Info[5]), |
|
|
|
Arguments.of("Station info BR3 at 9:00 pm", rp, "BR3", 21, rp.BR3Info[6]), |
|
|
|
Arguments.of("Station info BR3 at 3:00 am", rp, "BR3", 3, rp.BR3Info[7]) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|