Annotation Type ValueSource
-
@Target({ANNOTATION_TYPE,METHOD}) @Retention(RUNTIME) @Documented @API(status=EXPERIMENTAL, since="5.0") @ArgumentsSource(org.junit.jupiter.params.provider.ValueArgumentsProvider.class) public @interface ValueSource@ValueSourceis anArgumentsSourcewhich provides access to an array of literal values.Supported types include
shorts(),bytes(),ints(),longs(),floats(),doubles(),chars(),booleans(),strings(), andclasses(). Note, however, that only one of the supported types may be specified per@ValueSourcedeclaration.The supplied literal values will be provided as arguments to the annotated
@ParameterizedTestmethod.- Since:
- 5.0
- See Also:
ArgumentsSource,ParameterizedTest
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description boolean[]booleansThebooleanvalues to use as sources of arguments; must not be empty.byte[]bytesThebytevalues to use as sources of arguments; must not be empty.char[]charsThecharvalues to use as sources of arguments; must not be empty.java.lang.Class<?>[]classesTheClassvalues to use as sources of arguments; must not be empty.double[]doublesThedoublevalues to use as sources of arguments; must not be empty.float[]floatsThefloatvalues to use as sources of arguments; must not be empty.int[]intsTheintvalues to use as sources of arguments; must not be empty.long[]longsThelongvalues to use as sources of arguments; must not be empty.short[]shortsTheshortvalues to use as sources of arguments; must not be empty.java.lang.String[]stringsTheStringvalues to use as sources of arguments; must not be empty.
-