Module de.cuioss.test.generator
Interface ObjectGenerator<T>
- Type Parameters:
T- type of object generated
- All Superinterfaces:
Generator<T>
- All Known Implementing Classes:
ObjectDefaultMappingGenerator,ObjectGeneratorImpl
Declarative object generator definition.
User should call implementation of ObjectGenerator as follows:
ObjectGenerator<T> g;
Generator<R> methodGenerator;
g.on(g.getRecorder().method()).returns(methodGenerator);
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionImplementation of T that is used to define the method a generator should be defined for.<R> ObjectGenerator.ReturnValue<R>on(R value) Define a method a generator should be defined for.
-
Method Details
-
getRecorder
T getRecorder()Implementation of T that is used to define the method a generator should be defined for.- Returns:
- an implementation of T used only to record method calls
-
on
Define a method a generator should be defined for.- Type Parameters:
R- type of the return type- Parameters:
value- is ignored- Returns:
ObjectGenerator.ReturnValueinstance to define a generator for this method
-