Package org.instancio.junit
Annotation Type InstancioSource
@Target({ANNOTATION_TYPE,METHOD})
@Retention(RUNTIME)
@Documented
@ArgumentsSource(InstancioArgumentsProvider.class)
public @interface InstancioSource
Provides arguments for
@ParameterizedTest methods.
Supports multiple arguments. Each argument will be a fully-populated instance.
Example:
@ExtendWith(InstancioExtension.class)
class ExampleTest {
@ParameterizedTest
@InstancioSource
void someTestMethod(Person person) {
// ... use supplied person
}
}
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
Deprecated.parameter types will be resolved from method arguments, therefore specifying the types via the annotation is no longer necessary (this method will be removed in version3.0.0).Specifies parameter types to generate. Each specified type represents a parameter in theParameterizedTestmethod.- Returns:
- parameter types to generate
- Default:
- {}
-
3.0.0).