...Base usage:
BeanEqualsChecker checker = new BeanEqualsChecker();
checker.testEquals(MineBean.class);
For constructor with parameters, factory can be used:
checker.testEquals(MineBeanWithConstructor.class, new EqualBeanFactory<MineBeanWithConstructor>() {
@Override
public MineBeanWithConstructor create() {
return new MineBeanWithConstructor(1,"");
}
});
Custom validators, primitive generators can be added "BeanEqualsConfiguration".
Also can be used for instantiate beans and fill fields with random values, look at class "ObjectGenerator".
Compiled under JDK 1.6
Codebase is small, please look sources for details.
...