Module org.junit.jupiter.params
Class AnnotationBasedArgumentsProvider<A extends Annotation>
java.lang.Object
org.junit.jupiter.params.provider.AnnotationBasedArgumentsProvider<A>
- All Implemented Interfaces:
Consumer<A>
,ArgumentsProvider
,AnnotationConsumer<A>
@API(status=EXPERIMENTAL,
since="5.10")
public abstract class AnnotationBasedArgumentsProvider<A extends Annotation>
extends 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.- Since:
- 5.10
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal void
provideArguments
(ExtensionContext context) provideArguments
(ExtensionContext context, A annotation)
-
Constructor Details
-
AnnotationBasedArgumentsProvider
public AnnotationBasedArgumentsProvider()
-
-
Method Details
-
accept
- Specified by:
accept
in interfaceConsumer<A extends Annotation>
-
provideArguments
Description copied from interface:ArgumentsProvider
- Specified by:
provideArguments
in interfaceArgumentsProvider
- Parameters:
context
- the current extension context; nevernull
- Returns:
- a stream of arguments; never
null
-
provideArguments
protected abstract Stream<? extends Arguments> provideArguments(ExtensionContext context, A annotation) Provide aStream
ofArguments
— based on metadata in the provided annotation — to be passed to a@ParameterizedTest
method.- Parameters:
context
- the current extension context; nevernull
annotation
- the annotation to process; nevernull
- Returns:
- a stream of arguments; never
null
-