@ -29,7 +29,9 @@ public class RadioPlayer implements Device {
@Override
public void louder() {
Lautstaerke+=1;
if(Lautstaerke < 100){
Lautstaerke+=1;}
else Lautstaerke = 100;
}
@ -31,8 +31,8 @@ class RadioPlayerTest {
rp2.setLautstaerke(100);
rp2.louder();
return Stream.of(
Arguments.of("Test for one louder", rp1, 1),
Arguments.of("Test for one louder", rp2, 100)
Arguments.of("Test for one step louder", rp1, 1),
Arguments.of("Test for max louder", rp2, 100)
);