Class SlicesRuleDefinition
java.lang.Object
com.tngtech.archunit.library.dependencies.SlicesRuleDefinition
Allows to specify
Consider
ArchRules
for "slices" of a code base. A slice is conceptually
a cut through a code base according to business logic. Take for example
com.mycompany.myapp.order
com.mycompany.myapp.customer
com.mycompany.myapp.user
com.mycompany.myapp.authorization
The top level packages under 'myapp' are composed according to different domain aspects. It is
good practice, to keep such packages free of cycles, which is one capability that this class
provides.Consider
slices()
.matching("..myapp.(*)..")
.should()
.beFreeOfCycles()
Then this rule will assert, that the four slices of 'myapp' are free of cycles.-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic SlicesRuleDefinition.Creator
slices()
Entry point intoSlicesRuleDefinition
-
Method Details
-
slices
Entry point intoSlicesRuleDefinition
-