Annotation Type MethodSource
-
@Target({ANNOTATION_TYPE,METHOD}) @Retention(RUNTIME) @Documented @API(status=EXPERIMENTAL, since="5.0") @ArgumentsSource(org.junit.jupiter.params.provider.MethodArgumentsProvider.class) public @interface MethodSource@MethodSourceis anArgumentsSourcewhich provides access to values returned by methods of the class in which this annotation is declared.By default such methods must be
staticunless thePER_CLASStest instance lifecycle mode is used for the test class.The values returned by such methods will be provided as arguments to the annotated
@ParameterizedTestmethod.- Since:
- 5.0
- See Also:
ArgumentsSource,ParameterizedTest,TestInstance
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description java.lang.String[]valueThe names of the test class methods to use as sources for arguments; leave empty if the source method has the same name as the test method.
-