fix ArchUnitTest

This commit is contained in:
Michael Hoennig 2024-03-23 07:08:01 +01:00
parent 37f00a19f0
commit c02d3237dd

View File

@ -129,7 +129,8 @@ public class ArchitectureTest {
public static final ArchRule hsOfficeBankAccountPackageRule = classes() public static final ArchRule hsOfficeBankAccountPackageRule = classes()
.that().resideInAPackage("..hs.office.bankaccount..") .that().resideInAPackage("..hs.office.bankaccount..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.bankaccount..", .resideInAnyPackage(
"..hs.office.bankaccount..",
"..hs.office.sepamandate..", "..hs.office.sepamandate..",
"..hs.office.debitor..", "..hs.office.debitor..",
"..hs.office.migration.."); "..hs.office.migration..");
@ -139,7 +140,8 @@ public class ArchitectureTest {
public static final ArchRule hsOfficeSepaMandatePackageRule = classes() public static final ArchRule hsOfficeSepaMandatePackageRule = classes()
.that().resideInAPackage("..hs.office.sepamandate..") .that().resideInAPackage("..hs.office.sepamandate..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.sepamandate..", .resideInAnyPackage(
"..hs.office.sepamandate..",
"..hs.office.debitor..", "..hs.office.debitor..",
"..hs.office.migration.."); "..hs.office.migration..");
@ -148,7 +150,9 @@ public class ArchitectureTest {
public static final ArchRule hsOfficeContactPackageRule = classes() public static final ArchRule hsOfficeContactPackageRule = classes()
.that().resideInAPackage("..hs.office.contact..") .that().resideInAPackage("..hs.office.contact..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.contact..", "..hs.office.relation..", .resideInAnyPackage(
"..hs.office.contact..",
"..hs.office.relation..",
"..hs.office.partner..", "..hs.office.partner..",
"..hs.office.debitor..", "..hs.office.debitor..",
"..hs.office.membership..", "..hs.office.membership..",
@ -159,37 +163,46 @@ public class ArchitectureTest {
public static final ArchRule hsOfficePersonPackageRule = classes() public static final ArchRule hsOfficePersonPackageRule = classes()
.that().resideInAPackage("..hs.office.person..") .that().resideInAPackage("..hs.office.person..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.person..", "..hs.office.relation..", .resideInAnyPackage(
"..hs.office.person..",
"..hs.office.relation..",
"..hs.office.partner..", "..hs.office.partner..",
"..hs.office.debitor..", "..hs.office.debitor..",
"..hs.office.membership..", "..hs.office.membership..",
"..hs.office.migration.."); "..hs.office.migration..")
.orShould().haveNameNotMatching(".*Test$");
@ArchTest @ArchTest
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static final ArchRule hsOfficeRelationPackageRule = classes() public static final ArchRule hsOfficeRelationPackageRule = classes()
.that().resideInAPackage("..hs.office.relation..") .that().resideInAPackage("..hs.office.relation..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.relation..", .resideInAnyPackage(
"..hs.office.relation..",
"..hs.office.partner..", "..hs.office.partner..",
"..hs.office.migration.."); "..hs.office.migration..")
.orShould().haveNameNotMatching(".*Test$");
@ArchTest @ArchTest
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static final ArchRule hsOfficePartnerPackageRule = classes() public static final ArchRule hsOfficePartnerPackageRule = classes()
.that().resideInAPackage("..hs.office.partner..") .that().resideInAPackage("..hs.office.partner..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.partner..", .resideInAnyPackage(
"..hs.office.partner..",
"..hs.office.debitor..", "..hs.office.debitor..",
"..hs.office.membership..", "..hs.office.membership..",
"..hs.office.migration.."); "..hs.office.migration..")
.orShould().haveNameNotMatching(".*Test$");
@ArchTest @ArchTest
@SuppressWarnings("unused") @SuppressWarnings("unused")
public static final ArchRule hsOfficeMembershipPackageRule = classes() public static final ArchRule hsOfficeMembershipPackageRule = classes()
.that().resideInAPackage("..hs.office.membership..") .that().resideInAPackage("..hs.office.membership..")
.should().onlyBeAccessed().byClassesThat() .should().onlyBeAccessed().byClassesThat()
.resideInAnyPackage("..hs.office.membership..", .resideInAnyPackage(
"..hs.office.membership..",
"..hs.office.coopassets..", "..hs.office.coopassets..",
"..hs.office.coopshares..", "..hs.office.coopshares..",
"..hs.office.migration.."); "..hs.office.migration..");