|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface EqualsHashCodeContractTestCase
Test case that provides the contract for verification that an object's equals and hashCode are
implemented correctly.
| Method Summary | |
|---|---|
void |
equals_should_be_consistent()
If two objects are equal, they must remain equal as long as they are not modified. |
void |
equals_should_be_reflexive()
The object must be equal to itself, which it would be at any given instance; unless you intentionally override the equals method to behave otherwise. |
void |
equals_should_be_symmetric()
If object of one class is equal to another class object, the other class object must be equal to this class object. |
void |
equals_should_be_transitive()
If the first object is equal to the second object and the second object is equal to the third object; then the first object is equal to the third object. |
void |
should_maintain_equals_and_hashCode_contract()
If two objects are equal, then they must have the same hash code, however the opposite is NOT true. |
void |
should_not_be_equal_to_null()
Verifies that the implementation of the method equals returns false if a null is passed as
argument. |
void |
should_not_be_equal_to_Object_of_different_type()
|
| Method Detail |
|---|
void should_not_be_equal_to_Object_of_different_type()
void equals_should_be_consistent()
void equals_should_be_reflexive()
void equals_should_be_symmetric()
void equals_should_be_transitive()
void should_maintain_equals_and_hashCode_contract()
void should_not_be_equal_to_null()
equals returns false if a null is passed as
argument.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||