-
@Target({METHOD,PARAMETER}) @Retention(RUNTIME) @Documented @ArgumentsSource(RangeSourceArgumentsProvider.class) @Repeatable(IntRangeSources.class) public @interface IntRangeSource@IntRangeSourceis anArgumentsSourcethat provides access to a range ofintvalues.The supplied values will be provided as arguments to the annotated
@ParameterizedTestmethod.For more details and examples, see the documentation on range sources.
This annotation is
Repeatable, to make it usable withCartesianTest. If used withParameterizedTest, it can only be used once (becauseParameterizedTestcan only take a singleArgumentsSource). Using it more than once will throw anIllegalArgumentException. If used withCartesianTest, 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 withParameterizedTest, the annotation has to be on the method itself as any otherArgumentsSource.For more details and examples, see the documentation on Cartesian product tests.
- Since:
- 0.5
- See Also:
ArgumentsSource,ParameterizedTest,CartesianTest,CartesianTest
-
-
-
closed
boolean closed
Whether the range is closed (inclusive of theto()) or not.- Default:
- false
-
-