@API(status=EXPERIMENTAL,
since="5.10")
public abstract class AnnotationBasedArgumentsProvider<A extends java.lang.annotation.Annotation>
extends java.lang.Object
implements ArgumentsProvider, AnnotationConsumer<A>
AnnotationBasedArgumentsProvider is an abstract base class for
ArgumentsProvider implementations that also need to consume an
annotation in order to provide the arguments.ParameterizedTest,
ArgumentsSource,
Arguments,
ArgumentsProvider,
AnnotationConsumer| Modifier and Type | Field and Description |
|---|---|
private A |
annotation |
| Constructor and Description |
|---|
AnnotationBasedArgumentsProvider() |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(A annotation) |
java.util.stream.Stream<? extends Arguments> |
provideArguments(ExtensionContext context)
|
protected abstract java.util.stream.Stream<? extends Arguments> |
provideArguments(ExtensionContext context,
A annotation)
Provide a
Stream of Arguments — based on metadata in the
provided annotation — to be passed to a @ParameterizedTest method. |
private A extends java.lang.annotation.Annotation annotation
public final void accept(A annotation)
accept in interface java.util.function.Consumer<A extends java.lang.annotation.Annotation>public final java.util.stream.Stream<? extends Arguments> provideArguments(ExtensionContext context)
ArgumentsProviderprovideArguments in interface ArgumentsProvidercontext - the current extension context; never nullnullprotected abstract java.util.stream.Stream<? extends Arguments> provideArguments(ExtensionContext context, A annotation)
Stream of Arguments — based on metadata in the
provided annotation — to be passed to a @ParameterizedTest method.context - the current extension context; never nullannotation - the annotation to process; never nullnull