Class VoidGenerator
java.lang.Object
com.pholser.junit.quickcheck.generator.Generator<Void>
com.pholser.junit.quickcheck.generator.VoidGenerator
Produces values for property parameters of type
void or
Void.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanRegisterAsType(Class<?> type) Tells whether this generator is allowed to be used for property parameters of the given type.generate(SourceOfRandomness random, GenerationStatus status) Generates a value, possibly influenced by a source of randomness and metadata about the generation.Methods inherited from class com.pholser.junit.quickcheck.generator.Generator
addComponentGenerators, canGenerateForParametersOfTypes, canShrink, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, copy, doShrink, gen, gen, hasComponents, magnitude, narrow, numberOfNeededComponents, provide, shrink, types
-
Constructor Details
-
VoidGenerator
public VoidGenerator()
-
-
Method Details
-
generate
Description copied from interface:GenGenerates a value, possibly influenced by a source of randomness and metadata about the generation.- Parameters:
random- source of randomness to be used when generating the valuestatus- an object that can be used to influence the generated value. For example, generating lists can use thesizemethod to generate lists with a given number of elements.- Returns:
- the generated value
-
canRegisterAsType
Description copied from class:GeneratorTells whether this generator is allowed to be used for property parameters of the given type.- Overrides:
canRegisterAsTypein classGenerator<Void>- Parameters:
type- type against which to test this generator- Returns:
trueif the generator is allowed to participate in generating values for property parameters oftype
-