@Target({ANNOTATION_TYPE,METHOD})
@Retention(RUNTIME)
@Documented
@API(status=EXPERIMENTAL,
since="5.0")
@ArgumentsSource(org.junit.jupiter.params.provider.MethodArgumentsProvider.class)
public @interface MethodSource
@MethodSource is an ArgumentsSource which provides access
to values returned by methods of the class in
which this annotation is declared.
By default such methods must be static unless the
PER_CLASS
test instance lifecycle mode is used for the test class.
The values returned by such methods will be provided as arguments to the
annotated @ParameterizedTest method.
ArgumentsSource,
ParameterizedTest,
TestInstance| Modifier and Type | Required Element | Description |
|---|---|---|
java.lang.String[] |
value |
The names of the test class methods to use as sources for arguments; must
not be empty.
|