Consider this snippet:
@ParameterizedTest
@ValueSource(strings = {"a", "b", "c"})
void test(final String line) {
// code here
}
This will be an actual test, but for simplicity assume its purpose is to only print this:
Line 1: processed "a" successfully.
Line 2: processed "b" successfully.
Line 3: failed to process "c".
In other words, I want the index of the test values to be accessible within the test.
From what I found, {index}
can be used outside the test to name it properly.