From d1b481b3d06d984cdef8cc254cecfe97bea062a2 Mon Sep 17 00:00:00 2001 From: sahar Date: Wed, 16 Feb 2022 19:56:37 +0100 Subject: [PATCH] USB_StickTest.getAlbumTest First Case --- .../java/device/usbPlayer/USB_StickTest.java | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/test/java/device/usbPlayer/USB_StickTest.java diff --git a/src/test/java/device/usbPlayer/USB_StickTest.java b/src/test/java/device/usbPlayer/USB_StickTest.java new file mode 100644 index 0000000..a713b10 --- /dev/null +++ b/src/test/java/device/usbPlayer/USB_StickTest.java @@ -0,0 +1,33 @@ +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; + +import static org.assertj.core.api.Assertions.assertThat; + +class USB_StickTest { + + @ParameterizedTest + @MethodSource("getAlbumOptions") + void getAlbumTest(String testName, ArrayList album,int TestNr) {//, int expectedResult + //int volumeNum = inputPlay.getLautstaerke(); + if(TestNr == 1) + assertThat(album).describedAs(testName).isNotEmpty(); + } + + static Stream getAlbumOptions() { + USB_Stick stick = new USB_Stick(); + ArrayList AlbumsItems = new ArrayList<>(); + AlbumsItems= stick.getAlbum(); + + + return Stream.of( + Arguments.of("First Album is loaded", stick.getAlbum(),1)//,something + ); + } + +} \ No newline at end of file