Skip to content

Commit

Permalink
extra check
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Jan 13, 2025
1 parent b409a2e commit 1650b38
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@

import com.tngtech.archunit.core.importer.ClassFileImporter;
import com.tngtech.archunit.lang.syntax.ArchRuleDefinition;
import org.apache.maven.plugins.annotations.Mojo;
import org.junit.jupiter.api.Test;

/**
Expand Down Expand Up @@ -56,4 +57,14 @@ void mojosHaveOneParent() {
.check(new ClassFileImporter().importPackages("org.eolang.maven"));
}

@Test
void mojosHaveAnnotation() {
ArchRuleDefinition.classes()
.that().haveSimpleNameEndingWith("Mojo")
.and().doNotHaveSimpleName("SafeMojo")
.should()
.beAnnotatedWith(Mojo.class)
.check(new ClassFileImporter().importPackages("org.eolang.maven"));
}

}

0 comments on commit 1650b38

Please sign in to comment.