Public Access
test(architecture): apply the layer rules to repo packages
This commit is contained in:
1 parent
afcfacb68b
commit
b6be1879f0
2 files changed
+3
-3
No files matched your search
@@ -73,12 +73,12 @@ class ArchitectureTest extends AbstractArchitectureTest {
|
||||
@ArchTest
|
||||
static final ArchRule apis_should_only_call_services = noClasses()
|
||||
.that().resideInAPackage("..api..")
|
||||
.should().dependOnClassesThat().resideInAPackage("..persistence..")
|
||||
.should().dependOnClassesThat().resideInAnyPackage("..persistence..", "..repo..")
|
||||
.because("APIs must delegate to Services and should not access Persistence directly.");
|
||||
|
||||
@ArchTest
|
||||
static final ArchRule persistence_should_not_depend_on_apis = noClasses()
|
||||
.that().resideInAPackage("..persistence..")
|
||||
.that().resideInAnyPackage("..persistence..", "..repo..")
|
||||
.should().dependOnClassesThat().resideInAPackage("..api..")
|
||||
.because("Persistence layer must be independent of the API layer.");
|
||||
|
||||
|
||||
Reference in new issue
Block a user