Browse Source

added more options for showStationInfo() & third test case

feature-pr-getVolume
Jan Ortner 3 years ago
parent
commit
7b3851803e
  1. 2
      src/main/java/device/radioPlayer/RadioPlayer.java
  2. 7
      src/test/java/device/radioPlayer/RadioPlayerTest.java

2
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 "";
}

7
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))
);
}

Loading…
Cancel
Save