diff --git a/integration-tests/test-extension/src/test/java/io/quarkus/it/extension/ParamsTest.java b/integration-tests/test-extension/src/test/java/io/quarkus/it/extension/ParamsTest.java new file mode 100644 index 0000000000000..8460db8b12324 --- /dev/null +++ b/integration-tests/test-extension/src/test/java/io/quarkus/it/extension/ParamsTest.java @@ -0,0 +1,126 @@ +package io.quarkus.it.extension; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Set; +import java.util.stream.Stream; + +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.junit.jupiter.params.provider.ValueSource; + +import io.quarkus.test.junit.QuarkusTest; + +/** + * Exercise {@link ParameterizedTest @ParameterizedTest}s. + * + *
+ * This test will run into x-stream/xstream#253 on Java 16 and
+ * newer if the custom XStream converters are not used
+ */
+@QuarkusTest
+public class ParamsTest {
+ @ParameterizedTest
+ @ValueSource(booleans = { true, false })
+ public void valuesBooleans(boolean ignore) {
+ }
+
+ @ParameterizedTest
+ @ValueSource(strings = { "true", "false" })
+ public void valuesStrings(String ignore) {
+ }
+
+ @ParameterizedTest
+ @ValueSource(classes = { String.class, TestData.class })
+ public void valuesClasses(Class> ignore) {
+ }
+
+ @ParameterizedTest
+ @ValueSource(chars = { 'a', 'b', 'c' })
+ public void valuesChars(char ignore) {
+ }
+
+ @ParameterizedTest
+ @ValueSource(bytes = { (byte) 1, (byte) 2, (byte) 3 })
+ public void valuesBytes(byte ignore) {
+ }
+
+ @ParameterizedTest
+ @MethodSource("testDataStreamList")
+ public void methodStreamList(List> testDataStreamList() {
+ return Stream.of(Arrays.asList("a"), Arrays.asList("b"));
+ }
+
+ @ParameterizedTest
+ @MethodSource("testDataStreamListOf")
+ public void methodStreamListOf(List
> testDataStreamListOf() {
+ return Stream.of(List.of("a"));
+ }
+
+ @ParameterizedTest
+ @MethodSource("testDataStreamSetOf")
+ public void methodStreamListOf(Set
> testDataStreamArrayList() {
+ return Stream.of(Collections.emptyList());
+ }
+
+ @ParameterizedTest
+ @MethodSource("testDataStream")
+ public void methodStream(TestData ignore) {
+ }
+
+ static Stream