Skip to content

Commit

Permalink
migrated to ArchUnit 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
xpinjection committed Mar 10, 2024
1 parent 8f6b073 commit 98ec7da
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
<dependency>
<groupId>com.tngtech.archunit</groupId>
<artifactId>archunit-junit5</artifactId>
<version>0.23.1</version>
<version>1.2.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ public class CodingConventionRules {
@ArchTest
ArchRule standard_output_streams_should_not_be_used = NO_CLASSES_SHOULD_ACCESS_STANDARD_STREAMS;

@ArchTest
ArchRule deprecated_api_should_not_be_used = DEPRECATED_API_SHOULD_NOT_BE_USED;

@ArchTest
ArchRule test_classes_should_be_located_in_the_same_package = testClassesShouldResideInTheSamePackageAsImplementation();

@ArchTest
ArchRule controllers_should_not_depend_on_each_other =
classes().that().areAnnotatedWith(RestController.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public class HexagonalDesignRules {

@ArchTest
ArchRule packages_should_follow_hexagonal_design = layeredArchitecture()
.consideringAllDependencies()
.as("Packages structure should match hexagonal design rules")
.layer(DOMAIN).definedBy("..domain..")
.layer(SERVICE).definedBy("..service", "..service.dto..", "..service.exception..")
Expand Down

0 comments on commit 98ec7da

Please sign in to comment.