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

Implements #539: @Parameters(parametersValidators = <? extends IParametersValidator>) #542

Merged
merged 3 commits into from
Sep 2, 2022

Conversation

mkarg
Copy link
Collaborator

@mkarg mkarg commented Sep 1, 2022

This PR proposes a solution to #539 by adding the new interface IRule, and the new rules attribute to @Paramters. An example demonstrating mutual exclusive parameters is excluded. Also a test is included.

In contrast to #539 I dediced that it makes more sense to have rules at the @Parameters annotation on the class rather than rules on the single @Parameter level. The reason is that it would be confusing for the reader if a rule spanning over two parameters is just provided at one parameter annotation. This situation cannot happen if rules can only be given at the class annotation instead of the field annotation.

@mkarg
Copy link
Collaborator Author

mkarg commented Sep 1, 2022

@cbeust I would kindly request your review please. :-)

@mkarg mkarg force-pushed the rules branch 2 times, most recently from 72a5e23 to f8b3801 Compare September 1, 2022 12:20
@cbeust cbeust merged commit e67efca into cbeust:master Sep 2, 2022
@mkarg mkarg deleted the rules branch September 3, 2022 07:42
@mkarg mkarg changed the title Implements #539: @Parameters(rules = <? extends IRule>) Implements #539: @Parameters(parametersValidators = <? extends IParametersValidator>) Sep 3, 2022
@mkarg
Copy link
Collaborator Author

mkarg commented Sep 3, 2022

ℹ️ In contrast to the original comment, this PR implements #539 using different names than originally proposed. The new interface is called IParametersValidator (instead of IRule), and the annotation field is named parametersValidators (instead of rules).

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.

2 participants