Browse Source

added Test for station without Info text

feature-pr-getVolume
Jan Ortner 2 years ago
parent
commit
966541c2e2
  1. 4
      src/main/java/device/radioPlayer/RadioPlayer.java
  2. 5
      src/test/java/device/radioPlayer/RadioPlayerTest.java

4
src/main/java/device/radioPlayer/RadioPlayer.java

@ -40,8 +40,8 @@ public class RadioPlayer implements Device {
else if (x >= 13 && x < 16) return BR3Info[3];
else if (x >= 16 && x < 19) return BR3Info[4];
else if (x >= 19 && x < 21) return BR3Info[5];
else if (x >= 22 && x <= 23) return BR3Info[5];
else return BR3Info[6];
else if (x >= 22 && x <= 23) return BR3Info[6];
else return BR3Info[7];
}
String[] BR3Info = {"Sebastian Winkler und die Frühaufdreher", "BAYERN 3 - und DU mittendrin!", "Update", "Hits, Hits, Hits für euren Nachmittag", "Die Zwei für euren Feierabend", "Was geht?!", "Matuschke - der etwas andere Abend","Die Nacht"};

5
src/test/java/device/radioPlayer/RadioPlayerTest.java

@ -146,11 +146,14 @@ class RadioPlayerTest {
rp3.changeRegion("BY");
rp3.next();
rp3.next();
RadioPlayer rp4 = new RadioPlayer();
rp4.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("Test for getting info text after station switching ", rp3, rp1.getBR3InfoByTime(rp3.hour))
Arguments.of("Test for getting info text after station switching ", rp3, rp1.getBR3InfoByTime(rp3.hour)),
Arguments.of("Show info text for a station without ", rp4, "")
);
}

Loading…
Cancel
Save