Class QuickcheckArgumentsGeneratorFactory
java.lang.Object
edu.berkeley.cs.jqf.fuzz.junit.quickcheck.QuickcheckArgumentsGeneratorFactory
- All Implemented Interfaces:
ArgumentsGeneratorFactory
public final class QuickcheckArgumentsGeneratorFactory
extends Object
implements ArgumentsGeneratorFactory
Builds junit-quickcheck-backed
ArgumentsGenerators.
This is the reference generation provider. It resolves one
Generator per parameter through a GeneratorRepository, honouring
junit-quickcheck annotations such as @From, @Size, and
@InRange. The repository uses a fixed seed so generator setup is
reproducible; the per-trial randomness comes from the guided byte stream.
This class depends only on junit-quickcheck's generator API, not on its JUnit 4 runner, so it can serve both the JUnit 4 and JUnit 5 run paths.
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a factory with its own generator repository, seeded for reproducible setup.QuickcheckArgumentsGeneratorFactory(com.pholser.junit.quickcheck.internal.generator.GeneratorRepository repository) Creates a factory that resolves generators from the given repository. -
Method Summary
Modifier and TypeMethodDescriptionCreates a generator bound to the given test method.
-
Constructor Details
-
QuickcheckArgumentsGeneratorFactory
public QuickcheckArgumentsGeneratorFactory()Creates a factory with its own generator repository, seeded for reproducible setup. -
QuickcheckArgumentsGeneratorFactory
public QuickcheckArgumentsGeneratorFactory(com.pholser.junit.quickcheck.internal.generator.GeneratorRepository repository) Creates a factory that resolves generators from the given repository.- Parameters:
repository- the generator repository to resolve parameters against
-
-
Method Details
-
create
Description copied from interface:ArgumentsGeneratorFactoryCreates a generator bound to the given test method.- Specified by:
createin interfaceArgumentsGeneratorFactory- Parameters:
testClass- the class declaring the test methodtestMethod- the test method whose arguments will be generated- Returns:
- a generator for the method's parameters
-