ArchUnit
ArchUnit copied to clipboard
A Java architecture test library, to specify and assert architecture rules in plain Java
Hi ArchUnit Team, First of you do a great job here. ArchUnit is great. In our project we currently have >70 freeze files in the stored.rules mentioned. Digging deeper I...
I spottet a strange phaenomenon when using accessTargetWhere(): when using it like this: ``` @ArchTest private final static ArchRule doNotUseOptionalGet = noClasses() .should() .accessTargetWhere(owner(assignableTo(Optional.class)).and(nameMatching("get"))) .because("We want to use Optional.orElseThrow() instead...
Bumps org.asciidoctor.jvm.convert from 3.3.2 to 4.0.2. [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) You can trigger a rebase of this PR by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- Dependabot commands...
In a Spring Boot 2.7 project I implemented the following code: ``` package com.app.archunittest.constant; public enum DummyEnum { FIRST, SECOND, THIRD } ``` ``` package com.app.archunittest.service; import com.app.archunittest.constant.DummyEnum; import org.springframework.stereotype.Service;...
`JavaType#getAllInvolvedRawTypes()` throws `StackOverflowError` when invoked on a self-referential generic type. The problem can be reproduced with the following code snippet: ```java import com.tngtech.archunit.base.DescribedPredicate; import com.tngtech.archunit.core.domain.JavaMethod; import com.tngtech.archunit.core.importer.ClassFileImporter; import static com.tngtech.archunit.lang.conditions.ArchConditions.be;...
When calling the getEnclosingClass() on a nested class, the supplied class is the correct class, though it does not expose any of it's members.  There is a workaround for...
When using ArchUnit `@AnalyzeClasses` annotation with JUnit 5 run by Maven surefire plugin, the generated XML test results are missing the package name in the `classname` attribute of the `testcase`...
Hello, I'm using following code for rule: ``` classes() .that() .haveSimpleNameContaining("Command") .and() .doNotHaveModifier(JavaModifier.ABSTRACT) .should(new ArchCondition("In command package only result, request and command can be public") { @Override public void check(JavaClass...
Hello, First, thank you for your great work ! You are awesome :-) Second, I was using a field of type ClassFileImporter and a @Tag("toRefactor") on my test classes to...
The extensive freedom of how to create a `ConditionEvent` causes problems for any client that needs more structured results (e.g. tools). `ViolationHandler` provides a convenient API to obtain only those...