@Target(value={ANNOTATION_TYPE,METHOD}) @Retention(value=RUNTIME) @Documented @API(status=EXPERIMENTAL, since="5.0") @ArgumentsSource(value=ValueArgumentsProvider.class) public @interface ValueSource
@ValueSource
is an ArgumentsSource
which provides
access to an array of literal values of primitive types.
Supported primitive types include strings()
, ints()
,
longs()
, and doubles()
. You must not specify more than one
annotation attribute.
The supplied literal values will be provided as arguments to the
annotated @ParameterizedTest
method.
ArgumentsSource
,
ParameterizedTest
Modifier and Type | Optional Element and Description |
---|---|
double[] |
doubles
The
double values to use as sources of arguments; must not be
empty. |
int[] |
ints
The
int values to use as sources of arguments; must not be empty. |
long[] |
longs
The
long values to use as sources of arguments; must not be empty. |
java.lang.String[] |
strings
The
String values to use as sources of arguments; must not be
empty. |
public abstract java.lang.String[] strings
String
values to use as sources of arguments; must not be
empty.public abstract int[] ints
int
values to use as sources of arguments; must not be empty.