Skip to content
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

Merged
merged 20 commits into from May 14, 2024

Conversation

madalingiurca
Copy link
Contributor

@madalingiurca madalingiurca commented Apr 18, 2024

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

Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks promising! 👍

Copy link
Member

@marcphilipp marcphilipp left a 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!

@marcphilipp marcphilipp changed the title Add repeatable capabilities for @..Source annotations Make parameterized ArgumentSource annotations repeatable May 14, 2024
@marcphilipp marcphilipp merged commit 2886963 into junit-team:main May 14, 2024
14 checks passed
@marcphilipp
Copy link
Member

@madalingiurca Thanks a lot for seeing this through! 👍

@madalingiurca
Copy link
Contributor Author

@madalingiurca Thanks a lot for seeing this through! 👍

Thanks for reviewing and guidance as well! Great contribution experience!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support @EnumSource, @CsvSource, etc. as repeatable annotations
3 participants