Skip to content
This repository was archived by the owner on Aug 8, 2020. It is now read-only.
This repository was archived by the owner on Aug 8, 2020. It is now read-only.

add new test for clone implementation #2

@SierraGolf

Description

@SierraGolf

aspects

  • presence
    • is the method actually declared
  • completeness
    • every property which is not excluded must be copied, meaning the original and the copy must have the same value (not reference) after copying
    • one can not assure 100% that the property is really copied or if by accident the default value of the object matches the values used for testing
  • deep copy
    • every non-immutable and non-primitive property must be a deep copy, meaning the reference of the original and the copy must be different
    • can that actually be achieved with the current implementation of cg-proxy for interfaces, abstract and concrete classes?
    • may this be optional?
  • null-safety
    • the implementation of the clone method must be able to handle null values for every property which is not excluded

notes

  • does it make sense to compare the toString, equals and hashCode results of the cloned object to its original?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions