Browse Source

changed from getLautstaerke() to getVolume() like it is defined in device interface

feature-pr-getVolume
Jan Ortner 3 years ago
parent
commit
1912744e55
  1. 6
      src/main/java/device/radioPlayer/RadioPlayer.java
  2. 8
      src/test/java/device/radioPlayer/RadioPlayerTest.java

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

@ -64,10 +64,6 @@ public class RadioPlayer implements Device {
Lautstaerke = lautstaerke;
}
public int getLautstaerke() {
return Lautstaerke;
}
public void changeRegion(String region){
switch (region) {
case "BY":
@ -117,7 +113,7 @@ public class RadioPlayer implements Device {
}
@Override
public int getVolume() {
return 0;
return Lautstaerke;
}
@Override

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

@ -19,7 +19,7 @@ class RadioPlayerTest {
@ParameterizedTest
@MethodSource("quieterLouderOptions")
void quieterLouderTest(String testName, RadioPlayer testRp, int expectedResult) {
int volume = testRp.getLautstaerke();
int volume = testRp.getVolume();
assertThat(volume).describedAs(testName).isEqualTo(expectedResult);
}
@ -67,12 +67,6 @@ class RadioPlayerTest {
}
/*
@Test
void getVolume() {
}
*/
@ParameterizedTest
@MethodSource("prevNextOptions")
void prevNextTest(String testName, RadioPlayer testRp, String expectedResult) {

Loading…
Cancel
Save