Annotation Interface VerifyConstructor


If used on ValueObjectTest this test checks / tests constructors.

In order to define the constructor-args 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

    • 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.
    • 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:
      {}
    • allRequired

      boolean allRequired
      Returns:
      boolean indicating whether all attribute defined at of() are to be treated as required attributes. Defaults to false
      Default:
      false
    • 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 with defaultValued()
      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, see PropertyConfig.assertionStrategy() and AssertionStrategy.COLLECTION_IGNORE_ORDER. The default implementation will always respect / assert the same order of elements.
      Default:
      {}