Class TypeGeneratorMethodArgumentsProvider
java.lang.Object
de.cuioss.test.generator.junit.parameterized.TypeGeneratorMethodArgumentsProvider
- All Implemented Interfaces:
Consumer<TypeGeneratorMethodSource>,org.junit.jupiter.params.provider.ArgumentsProvider,org.junit.jupiter.params.support.AnnotationConsumer<TypeGeneratorMethodSource>
public class TypeGeneratorMethodArgumentsProvider
extends Object
implements org.junit.jupiter.params.provider.ArgumentsProvider, org.junit.jupiter.params.support.AnnotationConsumer<TypeGeneratorMethodSource>
Implementation of
ArgumentsProvider that provides arguments from a
TypedGenerator returned by a method for parameterized tests annotated
with TypeGeneratorMethodSource.
This provider invokes the specified method to obtain a TypedGenerator
instance and generates the requested number of values to be used as test
arguments.
The method can be:
- A method in the test class
- A static method in another class
- Since:
- 2.0
- Author:
- Oliver Wolff
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TypeGeneratorMethodSource annotation) longgetSeed()Stream<? extends org.junit.jupiter.params.provider.Arguments> provideArguments(org.junit.jupiter.api.extension.ExtensionContext context) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.junit.jupiter.params.provider.ArgumentsProvider
provideArguments
-
Constructor Details
-
TypeGeneratorMethodArgumentsProvider
public TypeGeneratorMethodArgumentsProvider()
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<TypeGeneratorMethodSource>
-
provideArguments
public Stream<? extends org.junit.jupiter.params.provider.Arguments> provideArguments(org.junit.jupiter.api.extension.ExtensionContext context) - Specified by:
provideArgumentsin interfaceorg.junit.jupiter.params.provider.ArgumentsProvider
-
getSeed
- Returns:
- the seed value used for this provider
-