@Target(value={ANNOTATION_TYPE,METHOD}) @Retention(value=RUNTIME) @Documented @Repeatable(value=CartesianValueSource.CartesianValueSources.class) @ArgumentsSource(value=org.junitpioneer.jupiter.CartesianValueArgumentsProvider.class) public @interface CartesianValueSource
@CartesianValueSource
is an argument source which provides access to
an array of literal values.
Supported types include shorts()
, bytes()
, ints()
,
longs()
, floats()
, doubles()
, chars()
,
booleans()
, strings()
, and classes()
. Note, however,
that only one of the supported types may be specified per
@CartesianValueSource
declaration.
The supplied literal values will be provided as an argument source to
the corresponding parameter of the annotated @CartesianProductTest
method.
This annotation is Repeatable
. You should declare one
@CartesianValueSource
per parameter.
CartesianProductTest
Modifier and Type | Optional Element and Description |
---|---|
boolean[] |
booleans
The
boolean values to use as sources of arguments; must not be empty. |
byte[] |
bytes
The
byte values to use as sources of arguments; must not be empty. |
char[] |
chars
The
char values to use as sources of arguments; must not be empty. |
java.lang.Class<?>[] |
classes
The
Class values to use as sources of arguments; must not be empty. |
double[] |
doubles
The
double values to use as sources of arguments; must not be empty. |
float[] |
floats
The
float 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. |
short[] |
shorts
The
short 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 short[] shorts
short
values to use as sources of arguments; must not be empty.public abstract byte[] bytes
byte
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.public abstract long[] longs
long
values to use as sources of arguments; must not be empty.public abstract float[] floats
float
values to use as sources of arguments; must not be empty.public abstract double[] doubles
double
values to use as sources of arguments; must not be empty.public abstract char[] chars
char
values to use as sources of arguments; must not be empty.public abstract boolean[] booleans
boolean
values to use as sources of arguments; must not be empty.