ArchUnit icon indicating copy to clipboard operation
ArchUnit copied to clipboard

A Java architecture test library, to specify and assert architecture rules in plain Java

Results 243 ArchUnit issues
Sort by recently updated
recently updated
newest added

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...

discussion

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...

enhancement
help wanted

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...

enhancement
help wanted
good start to contributing
topic:core

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. [![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=com.gradle.enterprise&package-manager=gradle&previous-version=3.11.1&new-version=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...

dependencies
java

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...