From 7b3851803e762d042f46458d0ffe202bb246a3be Mon Sep 17 00:00:00 2001 From: alpina0707 Date: Thu, 10 Feb 2022 22:01:17 +0100 Subject: [PATCH] added more options for showStationInfo() & third test case --- src/main/java/device/radioPlayer/RadioPlayer.java | 2 ++ src/test/java/device/radioPlayer/RadioPlayerTest.java | 7 ++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/device/radioPlayer/RadioPlayer.java b/src/main/java/device/radioPlayer/RadioPlayer.java index 9f928a1..5d771c6 100644 --- a/src/main/java/device/radioPlayer/RadioPlayer.java +++ b/src/main/java/device/radioPlayer/RadioPlayer.java @@ -162,6 +162,8 @@ public class RadioPlayer implements Device { return getAntenneBYInfoByTime(hour); case "YouFM": return getYouFMInfoByTime(hour); + case "Bayern 3": + return getBR3InfoByTime(hour); default: return ""; } diff --git a/src/test/java/device/radioPlayer/RadioPlayerTest.java b/src/test/java/device/radioPlayer/RadioPlayerTest.java index 2861364..5581857 100644 --- a/src/test/java/device/radioPlayer/RadioPlayerTest.java +++ b/src/test/java/device/radioPlayer/RadioPlayerTest.java @@ -142,10 +142,15 @@ class RadioPlayerTest { RadioPlayer rp1 = new RadioPlayer(); RadioPlayer rp2 = new RadioPlayer(); rp2.changeRegion("BY"); + RadioPlayer rp3 = new RadioPlayer(); + rp3.changeRegion("BY"); + rp3.next(); + rp3.next(); return Stream.of( Arguments.of("Show Station Info for first saved Radio", rp1, rp1.getYouFMInfoByTime(rp1.hour)), - Arguments.of("Show Station Info for regional Station", rp2, rp2.getAntenneBYInfoByTime(rp2.hour)) + Arguments.of("Show Station Info for regional Station", rp2, rp2.getAntenneBYInfoByTime(rp2.hour)), + Arguments.of("Test for getting info text after station switching ", rp3, rp1.getBR3InfoByTime(rp3.hour)) ); }