ArchUnit is a free, simple and extensible library for checking the architecture of your Java code using any plain Java unit test framework. That is, ArchUnit can check dependencies between packages and classes, layers and slices, check for cyclic dependencies and more. It does so by analyzing given Java bytecode, importing all classes into a Java code structure. You can find examples for the current release at ArchUnit Examples and the sources on GitHub.
There also exists a port for .NET/C#, which you can find here.
Nov 21, 2022 – New release of ArchUnit (v1.0.1)
Oct 3, 2022 – New release of ArchUnit (v1.0.0)
Jul 13, 2022 – New release of ArchUnit (v1.0.0-rc1)