Annotation Type IntRangeSource
@IntRangeSource
is an ArgumentsSource
that provides access to a range of int
values.
The supplied values will be provided as arguments to the annotated @ParameterizedTest
method.
For more details and examples, see
the documentation on Range Sources
This annotation is Repeatable
, to make it usable with CartesianProductTest
.
If used with ParameterizedTest
, it can only be used once (because ParameterizedTest
can only take a single ArgumentsSource
). Using it more than once will throw an IllegalArgumentException
.
If used with CartesianProductTest
, it can be repeated to provide arguments to
more than one parameter.
This annotation can be used on a method parameter, to make it usable with
CartesianTest
. If used with ParameterizedTest
,
the annotation has to be on the method itself as any other ArgumentsSource
.
For more details and examples, see
the documentation on Cartesian product tests
- Since:
- 0.5
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic @interface
Containing annotation of repeatableIntRangeSource
. -
Required Element Summary
-
Optional Element Summary
-
Element Details
-
from
int fromThe starting point of the range, inclusive. -
to
int toThe end point of the range, exclusive.
-
-
-
step
int stepThe size of the step between thefrom
and theto
.- Default:
- 1
-
closed
boolean closedWhether the range is closed (inclusive of theto()
) or not.- Default:
- false
-