Description
I was looking at how the Parameterized test suite works and thought of some extension to its current implementation.
I want to extend it such that it was able to use a constructor or public fields/methods to pass the value{s} for each test.
The other extension that I wanted was the ability to associate one or more Parameters annotation for a given test class and be able to associate these value{s} to specific test{s} within the test class.
I have then extended the pre-Parameter annotation addition of the Parameterized test suite.
This current one has the ability to associate one or more Parameters annotation static public methods containing input values that can be associated to zero or more tests of the test class.
The Parameters annotation includes a tests field that is used to associate the parameters to zero or more tests using a regular expression, defaults to .*.
The Parameters annotation includes a attributes field that is used to associate the field/method that the values are going to be
applied to, defaults to an empty array of Strings which defaults to using the constructor to pass the values.
While the Combination test suite has the same capability as the Parameterized test suite. The difference is that is passes all
possible combinations of the input values. The difference is that in the parameterized input values expects that each object array is a given set of values that will be injected for a given test. While the Combination input values expects that each object array contains values for a given field/attribute.
This work is part of the https://github.com/ccorsi/junit fork.
It contains the two new experimental suites and associated tests.
Take a look and let me know if you are interested in including these updates.