| Constructor and Description |
|---|
EnumGenerator(Class<?> enumType) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canShrink(Object larger)
Tells whether this generator is allowed to participate in the
Shrink process for the given "larger" value. |
void |
configure(ValuesOf flag) |
Enum<?> |
generate(SourceOfRandomness random,
GenerationStatus status)
Generates a value, possibly influenced by a source of randomness and
metadata about the generation.
|
addComponentGenerators, canGenerateForParametersOfTypes, canRegisterAsType, compatibleWithTypeParameter, configurationAnnotationsOn, configure, configure, copy, doShrink, gen, gen, hasComponents, magnitude, narrow, numberOfNeededComponents, provide, shrink, typespublic EnumGenerator(Class<?> enumType)
public void configure(ValuesOf flag)
public Enum<?> generate(SourceOfRandomness random, GenerationStatus status)
Genrandom - 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 the size method to generate lists with a given
number of elements.public boolean canShrink(Object larger)
GeneratorTells whether this generator is allowed to participate in the
Shrink process for the given "larger" value.
Unless overridden, the only criterion for whether a generator is allowed to participate in shrinking a value is if the value can be safely cast to the type of values the generator produces.
Copyright © 2019. All rights reserved.