Class DeepCopyTestHelper

java.lang.Object
de.cuioss.test.valueobjects.util.DeepCopyTestHelper

public class DeepCopyTestHelper extends Object
  • Constructor Details

  • Method Details

    • verifyDeepCopy

      public static void verifyDeepCopy(Object source, Object copy)
      To test the result of a deep copy function.

      The main focus is to check if the copy is independent from the source and does not have any reference to the source.

      To check the equality of the objects the equals method should be implemented correctly.

      Parameters:
      source - the source object
      copy - the result of the copy function
    • verifyDeepCopy

      public static void verifyDeepCopy(Object source, Object copy, Collection<String> ignoreProperties)
      To test the result of a deep copy function.

      The main focus is to check if the copy is independent from the source and does not have any reference to the source. -> Deep Copy, instead of shallow copy

      To check the equality of the objects the equals method should be implemented correctly.

      Parameters:
      source - the source object
      copy - the result of the copy function
      ignoreProperties - The top-level attribute names to be ignored