Annotation Interface VerifyCopyConstructor


If used on ValueObjectTest this test verifies a copy-constructor. Depending on its configuration it tests the individual properties to be copied correctly and of course the Object.equals(Object) method, see useObjectEquals(). It can only be used if at least one other verification contract is there.
Author:
Oliver Wolff
  • Element Details

    • exclude

      Returns:
      an array of properties, identified by their names that are not to be considered for this test: black-list
      Default:
      {}
    • of

      Returns:
      an array of properties, identified by their names that are to be considered for this test: white-list
      Default:
      {}
    • argumentType

      Returns:
      the actual type needed for the copy-constructor. It is only needed if it differs from the type of the bean under test. VerifyCopyConstructor acts as null value
      Default:
      de.cuioss.test.valueobjects.api.contracts.VerifyCopyConstructor.class
    • useObjectEquals

      Returns:
      boolean indicating whether to Object.equals(Object) as well, defaults to true
      Default:
      true
    • verifyDeepCopy

      Returns:
      boolean indicating whether to implicitly check whether the copy is a deep instead of a shallow copy, defaults to true. See verifyDeepCopyIgnore() as well
      Default:
      false
    • verifyDeepCopyIgnore

      Returns:
      an array of properties, identified by their names that are to be ignored by checking the deep copy, see verifyDeepCopy()
      Default:
      {}