Add parameterized module: JUnit 5 @ParameterizedTest argument sources, display names, and two real anti-pattern failures
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
Captured from a real `junit-platform-console-standalone --details=tree` run against
|
||||
CsvFileSourceTest, compiled and executed for real against the committed
|
||||
src/test/resources/test-data/postcode-regions.csv fixture.
|
||||
|
||||
╷
|
||||
├─ JUnit Platform Suite ✔
|
||||
├─ JUnit Jupiter ✔
|
||||
│ └─ CsvFileSourceTest ✔
|
||||
│ └─ shouldMapPostcodeToRegion(String, String) ✔
|
||||
│ ├─ postcode "SW1A" should map to region "London" ✔
|
||||
│ ├─ postcode "M1" should map to region "Manchester" ✔
|
||||
│ ├─ postcode "EH1" should map to region "Edinburgh" ✔
|
||||
│ ├─ postcode "CF10" should map to region "Cardiff" ✔
|
||||
│ └─ postcode "BT1" should map to region "Belfast" ✔
|
||||
└─ JUnit Vintage ✔
|
||||
|
||||
Test run finished after 208 ms
|
||||
[ 5 tests successful ]
|
||||
[ 0 tests failed ]
|
||||
|
||||
@CsvFileSource reads real rows from a real file on the classpath instead of inline strings --
|
||||
the five rows above are read from the CSV fixture's header row (postcode,region) plus five data
|
||||
rows, which exactly match the five entries Geocoder.java hardcodes internally.
|
||||
Reference in New Issue
Block a user