-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Make parameterized ArgumentSource annotations repeatable #3787
Conversation
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.
Looks promising! 👍
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CSVSources.java
Outdated
Show resolved
Hide resolved
...ter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java
Outdated
Show resolved
Hide resolved
...ter-params/src/main/java/org/junit/jupiter/params/support/AnnotationConsumerInitializer.java
Outdated
Show resolved
Hide resolved
...jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java
Outdated
Show resolved
Hide resolved
...s/src/main/java/org/junit/jupiter/params/provider/RepeatableAnnotationArgumentsProvider.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CSVSources.java
Outdated
Show resolved
Hide resolved
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.
I'm really looking forward to getting this merged!
documentation/src/docs/asciidoc/release-notes/release-notes-5.11.0-M1.adoc
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSources.java
Outdated
Show resolved
Hide resolved
...jupiter-params/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java
Show resolved
Hide resolved
…ntsProvider into one provider
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/FieldSources.java
Outdated
Show resolved
Hide resolved
junit-jupiter-params/src/main/java/org/junit/jupiter/params/provider/CsvFileSource.java
Outdated
Show resolved
Hide resolved
@madalingiurca Thanks a lot for seeing this through! 👍 |
Thanks for reviewing and guidance as well! Great contribution experience! |
Overview
These changes aim to add capabilities of repeatable
@..Source
annotations. Solves #3736.Repeatable capabilities added to every annotation that makes use of
AnnotationBasedArgumentsProvider
by adapting to accept multiple annotations while aggregating the result of each annotation arguments.Helper class
AnnotationConsumerInitializer
needs adaptations as well in order to invoke initialization for each annotation if repeatable.This change does not affect annotations related to null and/or empty sources:
@NullSource
,@EmptySource
and@NullAndEmptySource
. This makes sense since they have predefined/hardcoded arguments relevant to null and empty collections.I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations