|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Generator
Generator is the interface implemented by every test input generator.
A Generator is an object which synthesises test inputs for the methods
and constructors of the test class. The order in which inputs are created
must be deterministic, to allow for learned prediction of test outcomes.
Apart from this constraint, different kinds of Generator may produce their
test inputs according to different rules.
The default generation strategy is to create a monotonic sequence of
quasi-unique values of each type. However, custom generators may create
specific values, or revisit the same values in a controlled iteration.
There are two sub-interfaces of Generator: CustomGenerator is the
interface which all user-provided custom generators must satisfy. The
system-internal generators used by JWalk satisfy the MasterGenerator
interface.
Method Summary | |
---|---|
boolean |
canCreate(java.lang.Class<?> type)
Reports whether this Generator can create values of the requested type. |
java.lang.Object |
nextValue(java.lang.Class<?> type)
Creates the next quasi-unique value in sequence for a particular type. |
Method Detail |
---|
java.lang.Object nextValue(java.lang.Class<?> type) throws GeneratorException
type
- the requested type.
GeneratorException
- if no value of this type could be
synthesised.boolean canCreate(java.lang.Class<?> type)
type
- the requested type.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |