By default, the name of each test is simply the
toString() on the input row. This typically works well for data
However, we can customize this if we wish, by passing in test names into the
withData function in the form of pairs,
where the first element is the test name and the second element is the input value for that rorw.
The output from this example is now slightly clearer:
Another alternative is to implement the
WithDataTestName interface. When provided, the
toString() will not be
used, instead the
dataTestName function will be invoked for each row.
Finally, another option is to provide a function directly to the
Whether this is worth the extra effort or not depends on how readable the toString() method is on the data classes you are using.