Skip to content

Commit

Permalink
add interface naming rule for architecture test
Browse files Browse the repository at this point in the history
  • Loading branch information
WeRockStar committed Mar 21, 2024
1 parent cb2fb51 commit 33fa91a
Showing 1 changed file with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.kampus.kbazaar.architecture;

import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.classes;
import static com.tngtech.archunit.lang.syntax.ArchRuleDefinition.noClasses;

import com.tngtech.archunit.core.importer.ImportOption;
import com.tngtech.archunit.junit.AnalyzeClasses;
Expand Down Expand Up @@ -39,4 +40,13 @@ public class NamingRuleTest {
.should()
.haveSimpleNameEndingWith("Service")
.allowEmptyShould(true);

@ArchTest
static final ArchRule interfaces_naming_should_not_have_names_ending_with_the_word_interface =
noClasses()
.that()
.areInterfaces()
.should()
.haveSimpleNameContaining("Interface");

}

0 comments on commit 33fa91a

Please sign in to comment.