Data-driven tests with jUnit
In JUnit4 you can use the Parameterized testrunner to do data driven tests. It’s not terribly well documented, but the basic idea is to create a static method (annotated with @Parameters) that returns a Collection of Object arrays. Each of these arrays are used as the arguments for the test class constructor, and then the … Read more