Add parameterized module: JUnit 5 @ParameterizedTest argument sources, display names, and two real anti-pattern failures

This commit is contained in:
Claude
2026-10-03 21:50:52 +00:00
parent 8be1245951
commit ee75bfa792
45 changed files with 1179 additions and 0 deletions
@@ -0,0 +1,24 @@
Captured from a real `junit-platform-console-standalone --details=tree` run against
ValueSourceTest, compiled and executed for real.
╷
├─ JUnit Platform Suite ✔
├─ JUnit Jupiter ✔
│ └─ ValueSourceTest ✔
│ └─ shouldIdentifyPalindromes(String) ✔
│ ├─ "racecar" should be a palindrome ✔
│ ├─ "radar" should be a palindrome ✔
│ └─ "level" should be a palindrome ✔
└─ JUnit Vintage ✔
Test run finished after 171 ms
[ 3 tests successful ]
[ 0 tests failed ]
name = "{0} should be a palindrome" is the whole trick: {0} is a positional reference to the
single @ValueSource argument, and the console runner always quotes a String argument's own text
when it substitutes it in -- which is why the output reads "racecar" should be a palindrome
rather than requiring quotes inside the template itself. An earlier draft of this template used
name = "''{0}'' should be a palindrome", which doubles up with the console's own quoting and
renders as the much uglier '"racecar"' should be a palindrome -- fixed here before publishing by
simply dropping the extra quote marks from the template.