ArchUnit
ArchUnit copied to clipboard
A Java architecture test library, to specify and assert architecture rules in plain Java
When implementing #289 I wasn't sure how to write the rule text so that it's helpful and not too long, including * that field injection is an anti-pattern * links...
Want to control the API surface of a library, and in particular that we don't leak unintended classes. Two typical use-cases are OSGI and fat-jar with relocation. I'd like to...
If i am including a rule set in my tests i.e.: ``` @ArchTest public final ArchRules ruleSet = ArchRules.in(AnotherClass.class); ``` Is there a way to freeze all those rules without...
Sometimes it is useful to be able to compose ArchUnit tests from interfaces with default implementations. This is a pattern that works for JUnit for example. So I have an...
Consider the following scenario: ```java classes() .should(A) .andShould(B) .orShould(C) .andShould(D) ``` Typically boolean `and` is evaluated before boolean `or`. This would result in `(A and B) or (C and D)`....
On a recent project we're heavily using the visitor pattern, and would like to ensure that people who override visitor methods call the super implementation. Seemed to me like a...
Generate more readable names in the test report by replacing underscores in the original rule names by space. Adding this config in examples. #Hacktoberfest
I saw that #266 is resolved, but method calls described in `callMethod` are still not recognized in lambdas. I wrote a test that should ensure, that we don't use optional...
Bumps com.gradle.enterprise from 3.11.1 to 3.11.2. [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a...
I'm trying to write an `ArchCondition` that checks if all inner classes of a class have the same annotation, but with distinct values. However, I fail to see how I...