test(architecture): apply the layer rules to repo packages

This commit is contained in:
lobo committed 2026-09-30 13:41:56 +02:00
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.");