Class TypeGeneratorArgumentsProvider
java.lang.Object
de.cuioss.test.generator.junit.parameterized.AbstractTypedGeneratorArgumentsProvider
de.cuioss.test.generator.junit.parameterized.TypeGeneratorArgumentsProvider
- All Implemented Interfaces:
Consumer<TypeGeneratorSource>,org.junit.jupiter.params.provider.ArgumentsProvider,org.junit.jupiter.params.support.AnnotationConsumer<TypeGeneratorSource>
public class TypeGeneratorArgumentsProvider
extends AbstractTypedGeneratorArgumentsProvider
implements org.junit.jupiter.params.support.AnnotationConsumer<TypeGeneratorSource>
Implementation of
ArgumentsProvider that provides arguments from a
TypedGenerator for parameterized tests annotated with
TypeGeneratorSource.
This provider instantiates the specified TypedGenerator class and
generates the requested number of values to be used as test arguments.
Seed management is integrated with the existing
GeneratorControllerExtension to ensure
consistent and reproducible test data generation.
- Since:
- 2.0
- Author:
- Oliver Wolff
- See Also:
-
Field Summary
Fields inherited from class de.cuioss.test.generator.junit.parameterized.AbstractTypedGeneratorArgumentsProvider
IN_CLASS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(TypeGeneratorSource annotation) protected intgetCount()Gets the count of values to generate.protected longgetSeed()Gets the seed value specified for this provider.protected Stream<? extends org.junit.jupiter.params.provider.Arguments> provideArgumentsForGenerators(org.junit.jupiter.api.extension.ExtensionContext context) Template method to be implemented by subclasses to provide arguments.Methods inherited from class de.cuioss.test.generator.junit.parameterized.AbstractTypedGeneratorArgumentsProvider
createGeneratorInstance, determineSeed, findMethod, generateArguments, provideArgumentsMethods 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
-
TypeGeneratorArgumentsProvider
public TypeGeneratorArgumentsProvider()
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceConsumer<TypeGeneratorSource>
-
provideArgumentsForGenerators
protected Stream<? extends org.junit.jupiter.params.provider.Arguments> provideArgumentsForGenerators(org.junit.jupiter.api.extension.ExtensionContext context) Description copied from class:AbstractTypedGeneratorArgumentsProviderTemplate method to be implemented by subclasses to provide arguments.- Specified by:
provideArgumentsForGeneratorsin classAbstractTypedGeneratorArgumentsProvider- Parameters:
context- the extension context- Returns:
- a stream of arguments
-
getSeed
Description copied from class:AbstractTypedGeneratorArgumentsProviderGets the seed value specified for this provider.- Specified by:
getSeedin classAbstractTypedGeneratorArgumentsProvider- Returns:
- the seed value, or -1 if not specified
-
getCount
Description copied from class:AbstractTypedGeneratorArgumentsProviderGets the count of values to generate.- Specified by:
getCountin classAbstractTypedGeneratorArgumentsProvider- Returns:
- the count
-