资 源 简 介
Introduction
Reflection Test Utils is a Java library aiming to simplify testing of boring Java code.
In test-driven development each method needs to be tested. But writing tests for some methods can be a repetitive and boring task:
* Java bean no-arg constructors
* Java bean accessors
* hashcode
* equals
* toString
Having a library which would be able to test these methods automatically using reflection would increase code coverage, confidence in code correctness and remove lot of boring code.
Some code that needs to be tested may be even unreachable - for example private constructors in utility classes. Cobertura coverage tool then marks them as untested lowering code coverage percentage. Reflection Test Utils therefore also supports execution of private constructors.