Skip to content

Road Map

To Do

Set iterations via an instance of EqualsMethodTester

Currently you can only set iterations on a Configuration passed to testEqualsMethod. EqualsMethodTester will be enhanced to provide the same multi-invocation configuration currently offered by BeanTester.

Field-driven testing in EqualsMethodTester

Currently EqualsMethodTester only tests the significance of properties that have both a public getter and setter method. This is because its object manipulation logic is built on top of existing getter/setter manipulation logic used in the BeanTester. Using existing logic allowed rapid delivery of the majority of functionality. However, it is a limitation and it will be addressed. The fields of a class will instead be used to drive the test, rather than its public getter/setter methods.

Property significance verification for hashCode

Currently property significance verification is only performed by the EqualsMethodTester. HashCodeMethodTester will be enhanced to also implement a form of property significance verification. This will verify that only properties specified as insignificant may change the hashCode of an object.

Test non-public getter/setter methods

Currently only public getter/setter method pairs are tested. BeanTester will be enhanced to also test non-public getter/setter methods.

Collision detection

The EqualsMethodTester uses random generated test data test property significance in object equality. As a result, it is possible that a generated value may be the same as the value used by the provided “equivalent object” Factory for a given property. If this happens every time, then the objects will always be equal and the non-equal case will not be tested. We will implement logic to detect test value collision. If values collide every time and the non-equal case cannot be tested, an exception will be thrown.

Automatically detect classes to test

Currently the class to test must be specified when using the BeanTester testBean method. This requires that the developer know and specify each and every class they wish to test. It also requires that the developer remember to maintain the tests when adding and removing classes to test. We will implement classpath scanning logic to pick up classes to test.


Insignificant property varags validation

The EqualsMethodTester takes a String varargs property to name properties that are insignificant to object equality. If a non-existent property is specified in this parameter, it is simply disregarded. It would be better to instead throw an IllegalArgumentException in this scenario. Doing so will help developers keep their MeanBean tests synchronised with the objects they test. For example, if an insignificant property is removed from an object under test but the property is still specified in the insignificant properties varargs to EqualsMethodTested, the test would throw an exception, forcing the developer to address the discrepancy. We will implement this input validation logic.

This has now been implemented in Mean Bean 0.0.6

Simplify Equals & HashCode Method Testers

The EqualsMethodTester and HashCodeMethodTester both require that an EquivalentFactory be provided that creates unique but logically-equivalent objects. Rather than place the onus on the developer to provide the EquivalentFactory, instead we will attempt to create a prototype EquivalentFactory dynamically, meaning that the developer merely specifies the Class to test in a manner similar to the BeanTester.

This has now been implemented in Mean Bean 2.0.0.