-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Named arguments in parameterized tests #2521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
b91a199
to
61a5261
Compare
61a5261
to
9528e68
Compare
junit-jupiter-api/src/main/java/org/junit/jupiter/api/Named.java
Outdated
Show resolved
Hide resolved
documentation/src/docs/asciidoc/release-notes/release-notes-5.8.0-M1.adoc
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestExtension.java
Outdated
Show resolved
Hide resolved
...upiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestInvocationContext.java
Outdated
Show resolved
Hide resolved
...upiter-params/src/main/java/org/junit/jupiter/params/ParameterizedTestParameterResolver.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Marc Philipp <mail@marcphilipp.de>
Codecov Report
@@ Coverage Diff @@
## main #2521 +/- ##
============================================
- Coverage 90.53% 90.53% -0.01%
- Complexity 4713 4719 +6
============================================
Files 413 414 +1
Lines 11649 11670 +21
Branches 924 924
============================================
+ Hits 10547 10565 +18
- Misses 825 826 +1
- Partials 277 279 +2
Continue to review full report at Codecov.
|
cc13a7b
to
ca0f46e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 👍
This commit introduces a `Named` interface, which is used to wrap test arguments and give them names. Thanks to this, arguments in parameterized tests with `@MethodSource` or `@ArgumentSource` can now have optional names. When the argument is included in the display name of an iteration, this name will be used instead of the value.
Overview
Resolves #2301.
I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations