From 5885370fe321bede908b3baf3990fc0e9282dca3 Mon Sep 17 00:00:00 2001 From: alpina0707 Date: Thu, 17 Feb 2022 02:14:58 +0100 Subject: [PATCH] revised test for RadioPlayer getAntenneBYInfoByTime() --- src/test/java/device/radioPlayer/RadioPlayerTest.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/test/java/device/radioPlayer/RadioPlayerTest.java b/src/test/java/device/radioPlayer/RadioPlayerTest.java index d409765..680109c 100644 --- a/src/test/java/device/radioPlayer/RadioPlayerTest.java +++ b/src/test/java/device/radioPlayer/RadioPlayerTest.java @@ -104,8 +104,9 @@ class RadioPlayerTest { @ParameterizedTest @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("YouFM")) assertThat(testRp.getYouFMInfoByTime(hour)).describedAs(testName).isEqualTo(expectedResult); if(testTyp.equals("BR3")) assertThat(testRp.getBR3InfoByTime(hour)).describedAs(testName).isEqualTo(expectedResult); + if(testTyp.equals("AntenneBY")) assertThat(testRp.getAntenneBYInfoByTime(hour)).describedAs(testName).isEqualTo(expectedResult); } static Stream infoByTimeOptions() { @@ -125,7 +126,12 @@ class RadioPlayerTest { 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]) + Arguments.of("Station info BR3 at 3:00 am", rp, "BR3", 3, rp.BR3Info[7]), + Arguments.of("Station info AntenneBY at 5:00 am", rp, "AntenneBY", 5, rp.AntenneBYInfo[0]), + Arguments.of("Station info AntenneBY at 9:00 am", rp, "AntenneBY", 9, rp.AntenneBYInfo[1]), + Arguments.of("Station info AntenneBY at 12:00 am", rp, "AntenneBY", 12, rp.AntenneBYInfo[2]), + Arguments.of("Station info AntenneBY at 3:00 pm", rp, "AntenneBY", 15, rp.AntenneBYInfo[3]), + Arguments.of("Station info AntenneBY at 3:00 am", rp, "AntenneBY", 3, rp.AntenneBYInfo[4]) ); }