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

add symmetry check to equals integrity test #13

Open
SierraGolf opened this issue Oct 9, 2012 · 0 comments
Open

add symmetry check to equals integrity test #13

SierraGolf opened this issue Oct 9, 2012 · 0 comments
Milestone

Comments

@SierraGolf
Copy link
Member

background
the transitivity requirement on the equals implementation can only be tested partially by testing the reflexive requirement of the class under test. in order to allow a symmetry check for multiple related classes there should be an optional test which checks two or more given classes to be symmetric to the class under test.

requirements

  • the interface should allow the user to provide more than one class
  • class can but do not have to be related (sharing an interface or being part of the same class hierarchy)

signature
Builder checkSymmetryTo( Class... otherClasses)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant