|
|
@ -3,6 +3,7 @@ package device.usbPlayer; |
|
|
|
import org.junit.jupiter.params.ParameterizedTest; |
|
|
|
import org.junit.jupiter.params.provider.Arguments; |
|
|
|
import org.junit.jupiter.params.provider.MethodSource; |
|
|
|
|
|
|
|
import java.util.stream.Stream; |
|
|
|
import java.util.ArrayList; |
|
|
|
|
|
|
@ -162,6 +163,7 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) { |
|
|
|
Arguments.of("Volume was 100, should stay 100 ", up3, 100) |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
@ParameterizedTest |
|
|
|
@MethodSource("quieter_10_Options") |
|
|
|
void quieter_10_Test(String testName, UsbPlayer inputPlay, int expectedResult) { |
|
|
@ -251,15 +253,24 @@ void louderTest(String testName, UsbPlayer inputPlay, int expectedResult) { |
|
|
|
|
|
|
|
static Stream<Arguments> isAllAudioOptions() { |
|
|
|
UsbPlayer up1 = new UsbPlayer(); |
|
|
|
|
|
|
|
UsbPlayer up2 = new UsbPlayer(); |
|
|
|
ArrayList<String> Pl = new ArrayList<String>(); |
|
|
|
Pl.add("Musik 01.mp4"); |
|
|
|
Pl.add("Musik 02.mp4"); |
|
|
|
Pl.add("Musik 03.mp4"); |
|
|
|
up2.setPlaylist(Pl); |
|
|
|
//m4a |
|
|
|
UsbPlayer up3 = new UsbPlayer(); |
|
|
|
ArrayList<String> Pl1 = new ArrayList<String>(); |
|
|
|
Pl1.add("Musik 01.m4a"); |
|
|
|
Pl1.add("Musik 02.m4a"); |
|
|
|
Pl1.add("Musik 03.m4a"); |
|
|
|
up3.setPlaylist(Pl); |
|
|
|
return Stream.of( |
|
|
|
Arguments.of("Go to Song : Musik 03.mp3 ", up1.isAllAudio(), true), |
|
|
|
Arguments.of("Go to Song : Musik 03.mp3 ", up2.isAllAudio(), true) |
|
|
|
Arguments.of("Check if the Files are .mp3 ", up1.isAllAudio(), true), |
|
|
|
Arguments.of("Check if the Files are .mp4 ", up2.isAllAudio(), true), |
|
|
|
Arguments.of("Check if the Files are .m4a ", up3.isAllAudio(), true) |
|
|
|
|
|
|
|
); |
|
|
|
} |
|
|
|