Annotation Interface PropertyConfig
@Retention(RUNTIME)
@Target(TYPE)
@Repeatable(PropertyConfigs.class)
public @interface PropertyConfig
While the test classes are capable of auto-detecting JavaProperties you need
to adjust them from time to time. With this annotation you can do this.
- Author:
- Oliver Wolff
-
Required Element Summary
Required Elements -
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionDefines the the way how to deal with equality regarding PropertySupport.assertValueSet(Object)In case there is a collectionType defined the generated values will implicitly wrapped in the corresponding collection class defined by that wrapper, defaults toCollectionType.NO_ITERABLE
.boolean
Class<? extends de.cuioss.test.generator.TypedGenerator>
Defines different ways for reading / writing properties.de.cuioss.tools.property.PropertyMemberInfo
de.cuioss.tools.property.PropertyReadWrite
boolean
-
Element Details
-
name
Identifies the name of the property- Returns:
- the actual name of the property, must never be null nor empty
-
propertyClass
- Returns:
- the type of the property. This can either be the actual type, in case
PropertyMetadata.getCollectionType()
isCollectionType.NO_ITERABLE
, the component-type in case ofCollectionType.ARRAY_MARKER
or the type argument for a collection for the otherCollectionType
s, seePropertyMetadata.next()
andPropertyMetadata.resolveActualClass()
-
-
-
generator
- Returns:
- the wrapped
TypedGenerator
to dynamically create properties. If it is not setDynamicTypedGenerator
will be chosen
- Default:
- de.cuioss.test.valueobjects.generator.dynamic.DynamicTypedGenerator.class
-
defaultValue
boolean defaultValue- Returns:
- boolean indicating whether the property defines a default value, defaults to false
- Default:
- false
-
required
boolean required- Returns:
- boolean indicating whether the given property is required, defaults to false
- Default:
- false
-
propertyMemberInfo
de.cuioss.tools.property.PropertyMemberInfo propertyMemberInfo- Returns:
- The
PropertyMemberInfo
, defaults toPropertyMemberInfo.DEFAULT
- Default:
- DEFAULT
-
collectionType
In case there is a collectionType defined the generated values will implicitly wrapped in the corresponding collection class defined by that wrapper, defaults toCollectionType.NO_ITERABLE
.- Returns:
- the
CollectionType
- Default:
- NO_ITERABLE
-
propertyReadWrite
de.cuioss.tools.property.PropertyReadWrite propertyReadWrite- Returns:
- whether the property can be read or written, default to
PropertyReadWrite.READ_WRITE
- Default:
- READ_WRITE
-
propertyAccessStrategy
Defines different ways for reading / writing properties.- Returns:
- the
PropertyAccessStrategy
, defaults toPropertyAccessStrategy.BEAN_PROPERTY
- Default:
- BEAN_PROPERTY
-
assertionStrategy
Defines the the way how to deal with equality regarding PropertySupport.assertValueSet(Object)- Returns:
- the
AssertionStrategy
, defaults toAssertionStrategy.DEFAULT
- Default:
- DEFAULT
-