OpenPojo 0.7.4
oshoukry
released this
14 Aug 21:00
·
257 commits
to master
since this release
Added
- Simplified Pojo Validation, now there is a ValidatorBuilder class to simplify adding Rule(s) / Tester(s). Thanks to Felipe R. for suggesting and providing a working implementation, also thanks to Todd C. for being a sounding board on brain storming alternative approaches. This will simplify much of the boiler plate written to create tests against Pojos. For example:
Validator validator = ValidatorBuilder.create()
.with(new GetterMustExistRule())
.with(new SetterMustExistRule())
.with(new SetterTester())
.with(new GetterTester())
.build();
validator.validate(POJO_PACKAGE, new FilterPackageInfo());
Fixed
- BusinessIdentity.areEqual() / .doHashCode() was failing to do deep inspection with multi-dimentional arrays. (Thanks to Todd C. for uncovering this issue).
- TestClassMustBeProperlyNamedRule was failing when TestNG annotation was not loaded.
- FilterChain class used to throw null pointer exception when created with "null" filters, will now act as passive filter.
- A minor warning in Pojo validation was being thrown when an Interface was being validated without rules being added.