Browse Source

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/test/java/device/usbPlayer/UsbPlayerTest.java
feature-pr-organization
JPANZO 3 years ago
parent
commit
96c8abd272
  1. 20
      src/test/java/device/usbPlayer/UsbPlayerTest.java

20
src/test/java/device/usbPlayer/UsbPlayerTest.java

@ -5,7 +5,6 @@ import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource; import org.junit.jupiter.params.provider.MethodSource;
import java.util.ArrayList;
import java.util.stream.Stream; import java.util.stream.Stream;
import static org.junit.jupiter.api.Assertions.*; import static org.junit.jupiter.api.Assertions.*;
@ -15,6 +14,24 @@ class UsbPlayerTest {
UsbPlayer up = new UsbPlayer(); UsbPlayer up = new UsbPlayer();
@ParameterizedTest
@MethodSource("quieterOptions")
void quieterTest(String testName, UsbPlayer inputPlay, int expectedResult) {
int volumeNum = inputPlay.getLautstaerke();
assertThat(volumeNum).describedAs(testName).isEqualTo(expectedResult);
}
static Stream<Arguments> quieterOptions() {
UsbPlayer up1 = new UsbPlayer();
up1.quieter();
UsbPlayer up2 = new UsbPlayer();
up2.setLautstaerke(10);
up2.quieter();
return Stream.of(
Arguments.of("Volume must stay 0 ", up1, 0),
Arguments.of("Volume must be 9 ", up2, 9)
);
}
/* /*
@Test @Test
@ -59,4 +76,5 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) {
Arguments.of("Volume is : 100 ", up2, 100) Arguments.of("Volume is : 100 ", up2, 100)
); );
} }
*/
} }
Loading…
Cancel
Save