Browse Source

Merge commit 'c350b06358eaccff1c7961614bc165a0b59d3a63' into HEAD

feature-pr-playAddedRegionIndicator
Jenkins 3 years ago
parent
commit
c4002a49fa
  1. 2
      src/main/java/device/radioPlayer/RadioPlayer.java
  2. 16
      src/test/java/device/radioPlayer/RadioPlayerTest.java

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

@ -149,7 +149,7 @@ public class RadioPlayer implements Device {
@Override
public String play() {
return null;
return ("Radio is playing station: 0"+(Playlist.indexOf(playTrack)+1)+ " "+this.playTrack);
}
public String showStationInfo() {

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

@ -164,10 +164,20 @@ class RadioPlayerTest {
@Test
void chooseOption() {
}
*/
@ParameterizedTest
@MethodSource("testPlayOptions")
void testPlay(String testName, RadioPlayer testRp, String expectedResult) {
String playedStation = testRp.play();
assertThat(playedStation).describedAs(testName).isEqualTo(expectedResult);
}
@Test
void play() {
static Stream<Arguments> testPlayOptions() {
RadioPlayer rp1 = new RadioPlayer();
return Stream.of(
Arguments.of("Test for playing first station on saved playlist", rp1, "Radio is playing station: 01 YouFM")
);
}
*/
}
Loading…
Cancel
Save