Package de.cuioss.test.valueobjects.api.generator
package de.cuioss.test.valueobjects.api.generator
Provides annotations for adding / modifying existing
TypedGenerator
. This is useful if the
dynamically created generators won't fit. This is sometimes the case if an
attribute declaration uses an interfaces or abstract-class. Although the
generator-system is capable of providing generator capable of creating proxy
objects this won't suffice for some needs, because the proxies are not
Serializable
and not compliant to standard
Object.equals(Object)
and
Object.hashCode()
contracts. There are two ways to
configure the generator
PropertyGeneratorHint
: Actually hints the generator system which concrete implementation type to use for a declaredType:@PropertyGeneratorHint(declaredType = Serializable.class, implementationType = Integer.class)
defines that eachSerializable
should be anInteger
Caution: The implementationType should always provide an accessible Constructor. Factory or builder methods for object-creation will not be picked up at this level of configuration.PropertyGenerator
: Defines explicitly an implementation ofTypedGenerator
to be used.
-
Annotation InterfacesClassDescriptionUsed for adding an additional
TypedGenerator
for the actual test-class.For some cases it is simpler to give a hint for a certain type instead of declaringPropertyGenerator
.Wraps a number ofPropertyGenerator
elements.Wraps a number ofPropertyGenerator
elements.