Class AbstractInlineInstantiator<T>
java.lang.Object
de.cuioss.test.valueobjects.objects.impl.AbstractInlineInstantiator<T>
- Type Parameters:
T
- identifying the type of object to be instantiated
- All Implemented Interfaces:
ParameterizedInstantiator<T>
public abstract class AbstractInlineInstantiator<T>
extends Object
implements ParameterizedInstantiator<T>
ParameterizedInstantiator
for cases you actually are not able to use
the testing Infrastructure but want to benefit of the testing of the
ObjectTestContract
s- Author:
- Oliver Wolff
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
"Properties must not be null, but may be empty". -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract T
any()
newInstance
(List<PropertyMetadata> properties) Similar toParameterizedInstantiator.newInstance(List, boolean)
but with the difference that the caller has no control regarding the set / applied properties, that may be need for some asserts.newInstance
(List<PropertySupport> properties, boolean generatePropertyValues) Creates a new Object according to the given parameter, represented asList
ofPropertySupport
-
Field Details
-
PROPERTIES_MUST_NOT_BE_NULL
"Properties must not be null, but may be empty".- See Also:
-
-
Constructor Details
-
AbstractInlineInstantiator
public AbstractInlineInstantiator()
-
-
Method Details
-
newInstance
Description copied from interface:ParameterizedInstantiator
Creates a new Object according to the given parameter, represented asList
ofPropertySupport
- Specified by:
newInstance
in interfaceParameterizedInstantiator<T>
- Parameters:
properties
- to be applied to the newly created object.generatePropertyValues
- indicating whether this method should implicitly callPropertySupport.generateTestValue()
or not. In case beingfalse
the caller must ensure this.- Returns:
- a newly created object with the given properties being applied.
-
newInstance
Description copied from interface:ParameterizedInstantiator
Similar toParameterizedInstantiator.newInstance(List, boolean)
but with the difference that the caller has no control regarding the set / applied properties, that may be need for some asserts. It is some kind of any()- Specified by:
newInstance
in interfaceParameterizedInstantiator<T>
- Parameters:
properties
- to be applied to the newly created object.- Returns:
- a newly created object with the given properties being applied.
-
getRuntimeProperties
- Specified by:
getRuntimeProperties
in interfaceParameterizedInstantiator<T>
- Returns:
- the runtime information associated with this
ParameterizedInstantiator
-
newInstanceMinimal
- Specified by:
newInstanceMinimal
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with only required attributes set.
-
newInstanceFull
- Specified by:
newInstanceFull
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with all attributes set.
-
any
-