Class InjectedBeanInstantiator<T>
java.lang.Object
de.cuioss.test.valueobjects.objects.impl.InjectedBeanInstantiator<T>
- Type Parameters:
T
- identifying the type to be tested is usually but not necessarily at leastSerializable
.
- All Implemented Interfaces:
ParameterizedInstantiator<T>
Variant of
ParameterizedInstantiator
that deals with test, where the
actual beans to be tested are Injected by cdi, see TestObjectProvider
as well- Author:
- Oliver Wolff
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionnewInstance
(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
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface de.cuioss.test.valueobjects.objects.ParameterizedInstantiator
getRuntimeProperties
-
Constructor Details
-
InjectedBeanInstantiator
public InjectedBeanInstantiator()
-
-
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.
-
newInstanceFull
- Specified by:
newInstanceFull
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with all attributes set.
-
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.
-
newInstanceMinimal
- Specified by:
newInstanceMinimal
in interfaceParameterizedInstantiator<T>
- Returns:
- a new instance of the object with only required attributes set.
-
toString
-