crawljax/crawljax — pull request #276 by avandeursen (2013-06-10 21:59:14+00:00)
Title: Tests + Fixes for Equals/Hashcode/toString of Conditions

Wrote (parameterized) test suite for equals/hashCode/toString in the Condition class hierarchy, in new test class `ConditionTest`.

Fixed equals/hashCode/toString of the 11 classes providing `Condition` implementations by

* Removing super calls to Object.{equals, hashCode, toString}
* Adding the class-object itself to the computation of the hashCode
* Replacing arguments without equals method to their .toString counter parts in equals calls

The equals/hashCode methods in the Condition hierarchy now behave nicely.

As a bonus I removed some unnecessary AtomicInteger from CountCondition (which is quite tricky anyway as the check method has a side effect). Also, the counter itself is not included in the equality check atm.

Some refactoring of the Condition hierarchy is in place though -- see also issue #275.