Skip to content

Commit bbe7319

Browse files
authored
minor violation message change (#52)
1 parent f547ddd commit bbe7319

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/test/java/com/devonfw/sample/archunit/ComponentRules.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -25,32 +25,32 @@ static ArchRule serviceLayerShouldNotDependOnServiceLayerOfAnotherComponent() {
2525

2626
static ArchRule serviceLayerShouldNotDependOnLogicLayerOfAnotherComponent() {
2727

28-
return priority(Priority.HIGH).noClasses().that(haveServiceLayer()).should(dependOnOtherComponentsLogicLayer())
29-
.as("code from service layer of a component shall not depend on logic layer of a different component.").allowEmptyShould(true);
28+
return priority(Priority.HIGH).noClasses().that(haveServiceLayer()).should(dependOnOtherComponentsLogicLayer()).allowEmptyShould(true)
29+
.because("code from service layer of a component shall not depend on logic layer of a different component.");
3030
}
3131

3232
static ArchRule logicLayerShouldNotDependOnDataaccessLayerOfAnotherComponent() {
3333

34-
return priority(Priority.HIGH).noClasses().that(haveLogicLayer()).should(dependOnOtherComponentsDataaccessLayer())
35-
.as("code from logic layer shall not depend on dataaccess layer of a different component.").allowEmptyShould(true);
34+
return priority(Priority.HIGH).noClasses().that(haveLogicLayer()).should(dependOnOtherComponentsDataaccessLayer()).allowEmptyShould(true)
35+
.because("code from logic layer shall not depend on dataaccess layer of a different component.");
3636
}
3737

3838
static ArchRule dataaccessLayerShouldNotDependOnDataaccessLayerOfAnotherComponent() {
3939

40-
return priority(Priority.MEDIUM).noClasses().that(haveDataaccessLayer()).should(dependOnOtherComponentsDataaccessLayer())
41-
.as("code from dataaccess layer shall not depend on dataaccess layer of a different component.").allowEmptyShould(true);
40+
return priority(Priority.MEDIUM).noClasses().that(haveDataaccessLayer()).should(dependOnOtherComponentsDataaccessLayer()).allowEmptyShould(true)
41+
.because("code from dataaccess layer shall not depend on dataaccess layer of a different component.");
4242
}
4343

4444
static ArchRule batchLayerShouldNotDependOnLogicLayerOfAnotherComponent() {
4545

46-
return priority(Priority.MEDIUM).noClasses().that(haveBatchLayer()).should(dependOnOtherComponentsLogicLayer())
47-
.as("Code from batch layer of a component shall not depend on logic layer of a different component.").allowEmptyShould(true);
46+
return priority(Priority.MEDIUM).noClasses().that(haveBatchLayer()).should(dependOnOtherComponentsLogicLayer()).allowEmptyShould(true)
47+
.because("Code from batch layer of a component shall not depend on logic layer of a different component.");
4848
}
4949

5050
static ArchRule generalDoesNotDependOnAnotherComponent() {
5151

52-
return priority(Priority.MEDIUM).noClasses().that(haveGeneralComponent()).should().accessClassesThat(notHaveGeneralComponent())
53-
.as("general component must not depend on any other component.").allowEmptyShould(true);
52+
return priority(Priority.MEDIUM).noClasses().that(haveGeneralComponent()).should().accessClassesThat(notHaveGeneralComponent()).allowEmptyShould(true)
53+
.because("general component must not depend on any other component.");
5454
}
5555

5656
}

0 commit comments

Comments
 (0)