-
Notifications
You must be signed in to change notification settings - Fork 314
Check multiple ArchRules at once #78
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
Comments
I take it, you're not using the JUnit 4 support, are you? Because then you could simply aggregate Tests like
(which works recursively, this is how we compose This will work with the JUnit 5 support as well, once it's finished.
This will join all rule descriptions and after that join all errors of all rules in one shot, instead of failing after the first. I have pondered about making I think you're right though, that ArchUnit should offer a way out of the box to create such composite rules, even it no extra testing support is used. I'll think about it, where this could be added the best (whether it's I hope you can use that POC for now though for your use case, let me know if you have trouble!! |
Issue: TNG#78 Signed-off-by: Moritz Bogs <moritz.bogs@tngtech.com>
…actory methods instead of constructors, make fields immutable. Issue: TNG#78 Signed-off-by: Moritz Bogs <moritz.bogs@tngtech.com>
Multiple ArchRules can be checked at once via CompositeArchRule.of(rule1).and(rule2). Also added sample tests for both plain, junit4 and junit5 Issue: TNG#78 Signed-off-by: Moritz Bogs <moritz.bogs@tngtech.com>
Issue: TNG#78 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Multiple ArchRules can be checked at once via CompositeArchRule.of(rule1).and(rule2). Also added sample tests for both plain, junit4 and junit5 Issue: TNG#78 Signed-off-by: Moritz Bogs <moritz.bogs@tngtech.com>
Issue: TNG#78 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
Resolved by #128 |
Multiple ArchRules can be checked at once via CompositeArchRule.of(rule1).and(rule2). Also added sample tests for both plain, junit4 and junit5 Issue: #78 Signed-off-by: Moritz Bogs <moritz.bogs@tngtech.com>
Issue: #78 Signed-off-by: Peter Gafert <peter.gafert@tngtech.com>
I want to provide a shared library with common rules. These rules are used in different corporate projects. This is to ensure that every project is built the same way.
Example:
This prints only the violations of the first violated rule.
Now I want to ensure that in every project every of those common rules is checked. If a new common rule is added to the library, every project should execute this new rule without further code modification.
I thought of something like this:
This check should print all violations of all given rules.
The text was updated successfully, but these errors were encountered: