From 1edbe864b6575e37477228b331aa3822d4889ec0 Mon Sep 17 00:00:00 2001
From: Michael Hoennig <michael@hoennig.de>
Date: Sun, 30 Oct 2022 09:38:59 +0100
Subject: [PATCH] amend architecture test

---
 src/test/java/net/hostsharing/hsadminng/arch/ArchitectureTest.java |   58 +++++++++++++++++++++++++++++++++++++++++++---------------
 1 files changed, 43 insertions(+), 15 deletions(-)

diff --git a/src/test/java/net/hostsharing/hsadminng/arch/ArchitectureTest.java b/src/test/java/net/hostsharing/hsadminng/arch/ArchitectureTest.java
index cafd3a0..a578320 100644
--- a/src/test/java/net/hostsharing/hsadminng/arch/ArchitectureTest.java
+++ b/src/test/java/net/hostsharing/hsadminng/arch/ArchitectureTest.java
@@ -30,16 +30,17 @@
                     "..test.pac",
                     "..context",
                     "..generated..",
-                    "..hs.office.person",
-                    "..hs.office.partner",
                     "..hs.office.bankaccount",
-                    "..hs.office.debitor",
-                    "..hs.office.relationship",
                     "..hs.office.contact",
-                    "..hs.office.sepamandate",
                     "..hs.office.coopassets",
                     "..hs.office.coopshares",
+                    "..hs.office.debitor",
                     "..hs.office.membership",
+                    "..hs.office.migration",
+                    "..hs.office.partner",
+                    "..hs.office.person",
+                    "..hs.office.relationship",
+                    "..hs.office.sepamandate",
                     "..errors",
                     "..mapper",
                     "..ping",
@@ -121,14 +122,19 @@
     public static final ArchRule hsOfficeBankAccountPackageRule = classes()
             .that().resideInAPackage("..hs.office.bankaccount..")
             .should().onlyBeAccessed().byClassesThat()
-            .resideInAnyPackage("..hs.office.bankaccount..", "..hs.office.sepamandate..", "..hs.office.debitor..");
+            .resideInAnyPackage("..hs.office.bankaccount..",
+                    "..hs.office.sepamandate..",
+                    "..hs.office.debitor..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
     public static final ArchRule hsOfficeSepaMandatePackageRule = classes()
             .that().resideInAPackage("..hs.office.sepamandate..")
             .should().onlyBeAccessed().byClassesThat()
-            .resideInAnyPackage("..hs.office.sepamandate..", "..hs.office.debitor..");
+            .resideInAnyPackage("..hs.office.sepamandate..",
+                    "..hs.office.debitor..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
@@ -136,7 +142,10 @@
             .that().resideInAPackage("..hs.office.contact..")
             .should().onlyBeAccessed().byClassesThat()
             .resideInAnyPackage("..hs.office.contact..", "..hs.office.relationship..",
-                    "..hs.office.partner..", "..hs.office.debitor..", "..hs.office.membership..");
+                    "..hs.office.partner..",
+                    "..hs.office.debitor..",
+                    "..hs.office.membership..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
@@ -144,35 +153,47 @@
             .that().resideInAPackage("..hs.office.person..")
             .should().onlyBeAccessed().byClassesThat()
             .resideInAnyPackage("..hs.office.person..", "..hs.office.relationship..",
-                    "..hs.office.partner..", "..hs.office.debitor..", "..hs.office.membership..");
+                    "..hs.office.partner..",
+                    "..hs.office.debitor..",
+                    "..hs.office.membership..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
     public static final ArchRule hsOfficeRelationshipPackageRule = classes()
             .that().resideInAPackage("..hs.office.relationship..")
             .should().onlyBeAccessed().byClassesThat()
-            .resideInAnyPackage("..hs.office.relationship..");
+            .resideInAnyPackage("..hs.office.relationship..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
     public static final ArchRule hsOfficePartnerPackageRule = classes()
             .that().resideInAPackage("..hs.office.partner..")
             .should().onlyBeAccessed().byClassesThat()
-            .resideInAnyPackage("..hs.office.partner..", "..hs.office.debitor..", "..hs.office.membership..");
+            .resideInAnyPackage("..hs.office.partner..",
+                    "..hs.office.debitor..",
+                    "..hs.office.membership..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
     public static final ArchRule hsOfficeMembershipPackageRule = classes()
             .that().resideInAPackage("..hs.office.membership..")
             .should().onlyBeAccessed().byClassesThat()
-            .resideInAnyPackage("..hs.office.membership..", "..hs.office.coopassets..", "..hs.office.coopshares..");
+            .resideInAnyPackage("..hs.office.membership..",
+                    "..hs.office.coopassets..",
+                    "..hs.office.coopshares..",
+                    "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
     public static final ArchRule hsOfficeCoopAssetsPackageRule = classes()
         .that().resideInAPackage("..hs.office.coopassets..")
         .should().onlyBeAccessed().byClassesThat()
-        .resideInAnyPackage("..hs.office.coopassets..");
+        .resideInAnyPackage(
+                "..hs.office.coopassets..",
+                "..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
@@ -180,6 +201,13 @@
             .that().resideInAPackage("..hs.office.coopshares..")
             .should().onlyBeAccessed().byClassesThat()
             .resideInAnyPackage("..hs.office.coopshares..");
+
+    @ArchTest
+    @SuppressWarnings("unused")
+    public static final ArchRule hsOfficeMigrationPackageRule = classes()
+            .that().resideInAPackage("..hs.office.migration..")
+            .should().onlyBeAccessed().byClassesThat()
+            .resideInAnyPackage("..hs.office.migration..");
 
     @ArchTest
     @SuppressWarnings("unused")
@@ -197,7 +225,7 @@
 
     @ArchTest
     @SuppressWarnings("unused")
-    public static final ArchRule doNotUsejakartaTransactionAnnotationAtClassLevel = noClasses()
+    public static final ArchRule doNotUseJakartaTransactionAnnotationAtClassLevel = noClasses()
             .should().beAnnotatedWith(jakarta.transaction.Transactional.class.getName())
             .as("Use @%s instead of @%s.".formatted(
                     org.springframework.transaction.annotation.Transactional.class.getName(),
@@ -205,7 +233,7 @@
 
     @ArchTest
     @SuppressWarnings("unused")
-    public static final ArchRule doNotUsejakartaTransactionAnnotationAtMethodLevel = noMethods()
+    public static final ArchRule doNotUseJakartaTransactionAnnotationAtMethodLevel = noMethods()
             .should().beAnnotatedWith(jakarta.transaction.Transactional.class)
             .as("Use @%s instead of @%s.".formatted(
                     org.springframework.transaction.annotation.Transactional.class.getName(),

--
Gitblit v1.9.3