Implement the equality check!
As a matter of good practice, you should implement the equality check for data type objects where object comparison is necessary.
Language | Method |
---|---|
Java | equals() |
C# | Equals() |
With testing in general, many tests will want to test whether ObjectA == ObjectB
. Your test framework would then use the equals assertion. If the equality check does not exist, you will get an error like this (depending on IDE and language).
