25 lines
1.2 KiB
Plaintext
25 lines
1.2 KiB
Plaintext
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.
|