Annotation Interface VerifyFactoryMethod
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(VerifyFactoryMethods.class)
public @interface VerifyFactoryMethod
If used on ValueObjectTest this test checks / tests factory-methods.
In order to define the arguments in the correct order you need to pass them
using of()
As default it assumes the individual arguments to be optional, saying null is
allowed. This can be controlled by required()
- Author:
- Oliver Wolff
-
Element Details
-
factoryMethodName
- Returns:
- the name of the factory method to be called
-
of
- Returns:
- an array of properties, identified by their names that are to be considered for this test: Caution: The order of the names must exactly match the order of the attributes of corresponding constructor.
-
-
-
enclosingType
- Returns:
- the (optional) type where the factory method is declared. If it is
not set it is assumed to be located at the actual type under test.
The default
VerifyFactoryMethod
acts as null value.
- Default:
- de.cuioss.test.valueobjects.api.contracts.VerifyFactoryMethod.class
-
required
- Returns:
- an array of properties, identified by their names that are to be
treated as required properties, see
PropertyMetadata.isRequired()
. it is used
- Default:
- {}
-
transientProperties
- Returns:
- an array of properties, identified by their names that are to be
treated as transient properties, see
PropertyMemberInfo.TRANSIENT
- Default:
- {}
-
defaultValued
- Returns:
- an array of properties, identified by their names that are to be
treated as having a default values, see
PropertyMetadata.isDefaultValue()
- Default:
- {}
-
readOnly
- Returns:
- an array of properties, identified by their names that are to be
treated as being read-only, see
PropertyReadWrite.READ_ONLY
, usually used in conjunction withdefaultValued()
- Default:
- {}
-
writeOnly
- Returns:
- an array of properties, identified by their names that are to be
treated as being write-only, see
PropertyReadWrite.WRITE_ONLY
, usually used in cases where a property to be written will result in other properties but itself can not be accessed directly
- Default:
- {}
-
assertUnorderedCollection
- Returns:
- an array of properties, identified by their names representing at
least a
Collection
that are to be asserted ignoring the concrete order, seePropertyConfig.assertionStrategy()
andAssertionStrategy.COLLECTION_IGNORE_ORDER
. The default implementation will always respect / assert the same order of elements.
- Default:
- {}
-