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
|
||||
ArgumentsSourceTest, compiled and executed for real.
|
||||
|
||||
╷
|
||||
├─ JUnit Platform Suite ✔
|
||||
├─ JUnit Jupiter ✔
|
||||
│ └─ ArgumentsSourceTest ✔
|
||||
│ └─ testWithExternalScenarios(String, int, boolean) ✔
|
||||
│ ├─ scenario: "happy_path" ✔
|
||||
│ ├─ scenario: "zero_value" ✔
|
||||
│ └─ scenario: "max_boundary" ✔
|
||||
└─ JUnit Vintage ✔
|
||||
|
||||
Test run finished after 212 ms
|
||||
[ 3 tests successful ]
|
||||
[ 0 tests failed ]
|
||||
|
||||
@ArgumentsSource(ScenarioArgumentsProvider.class) delegates argument production to a real,
|
||||
separately-compiled class implementing ArgumentsProvider -- the escape hatch to reach for once a
|
||||
data source needs more structure than @MethodSource's single static method comfortably holds
|
||||
(loading fixtures, branching on environment, composing other providers). ScenarioArgumentsProvider
|
||||
overrides the current provideArguments(ParameterDeclarations, ExtensionContext) overload rather
|
||||
than the older single-argument form, which still compiles but is now deprecated.
|
||||
Reference in New Issue
Block a user