Class QuickcheckArgumentsGenerator
- All Implemented Interfaces:
ArgumentsGenerator
ArgumentsGenerator backed by junit-quickcheck generators.
Each parameter has its own pre-resolved Generator. On every trial,
the guided byte stream is wrapped in a StreamBackedRandom and adapted
to a junit-quickcheck SourceOfRandomness so the generators consume it.
Running out of input surfaces as an IllegalStateException wrapping an
EOFException, which the engine treats as a skipped trial.
The StreamBackedRandom is built with an eight-byte leading-ignore
window because SourceOfRandomness's constructor reads eight bytes to
seed itself and then discards them; ignoring them keeps generation reading
from the first real input byte. This is a junit-quickcheck quirk, so it lives
here rather than in the engine.
-
Method Summary
Modifier and TypeMethodDescriptionObject[]generate(InputStream input) Generates one trial's arguments from the given input.
-
Method Details
-
generate
Description copied from interface:ArgumentsGeneratorGenerates one trial's arguments from the given input.The array length equals the test method's parameter count. Reading past the end of the input typically surfaces as a
SkipTrialException, which the engine treats as a signal to move on to the next input rather than as a test failure.- Specified by:
generatein interfaceArgumentsGenerator- Parameters:
input- the guided input bytes for this trial- Returns:
- the arguments to pass to the test method
-