Skip to content

Commit

Permalink
refactor architecture test to detect from naming convension instead o…
Browse files Browse the repository at this point in the history
…f annotated RestController
  • Loading branch information
WeRockStar committed Mar 21, 2024
1 parent 8b72a59 commit d154696
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ public class DependencyRuleTest {
static final ArchRule service_should_access_by_controller =
classes()
.that()
.areAnnotatedWith(Service.class)
.haveSimpleNameEndingWith("Service")
.should()
.onlyBeAccessed()
.byClassesThat()
.areAnnotatedWith(RestController.class)
.haveSimpleNameEndingWith("Controller")
.allowEmptyShould(true);

@ArchTest
Expand Down

0 comments on commit d154696

Please sign in to comment.