You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SierraGolf edited this page Sep 2, 2012
·
6 revisions
TODO give more details and show examples
Tests
toString
check if the toString method is implemented
integrity check to see if all properties which have not been excluded are contained in the toString result
check if property exclude is necessary (e.g. property is excluded, but actually handled in the toString method)
null check to see if all properties which have not been excluded are handled in a null-safe way
format check to see if the toString result is matching a given pattern
equals
check if the equals method is implemented
integrity check to see if all properties which have not been excluded are contained in the equals implementation
check if property exclude is necessary (e.g. property is excluded, but actually handled in the equals method)
null check to see if all properties which have not been excluded are handled in a null-safe way
this check is symmetric, which means it will check if the null-safety counts for this and the given objects properties
check if the object of the class under test:
is not equal to null
is equal to it self
is symmetric to it self for every changed property
hashCode
check if the hashCode method is implemented
integrity check to see if all properties which have not been excluded are contained in the hashCode implementation
check if property exclude is necessary (e.g. property is excluded, but actually handled in the hashCode method)
check if the hashCodes for two objects of the class under test are equal when they are equal according to their equals method (hashCode/equals contract)
null check to see if all properties which have not been excluded are handled in a null-safe way