From b409a2ec9b3c75553da122d66f79120f231d9f58 Mon Sep 17 00:00:00 2001 From: Yegor Bugayenko Date: Mon, 13 Jan 2025 18:38:24 +0300 Subject: [PATCH] extra check --- .../test/java/org/eolang/maven/ArchitectureTest.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/eo-maven-plugin/src/test/java/org/eolang/maven/ArchitectureTest.java b/eo-maven-plugin/src/test/java/org/eolang/maven/ArchitectureTest.java index 7cbfcd719e..92ca3818bd 100644 --- a/eo-maven-plugin/src/test/java/org/eolang/maven/ArchitectureTest.java +++ b/eo-maven-plugin/src/test/java/org/eolang/maven/ArchitectureTest.java @@ -42,6 +42,17 @@ void mojosAreInPlace() { .and().doNotHaveSimpleName("SafeMojo") .should().resideInAPackage("org.eolang.maven") .andShould().bePublic() + .andShould().beTopLevelClasses() + .check(new ClassFileImporter().importPackages("org.eolang.maven")); + } + + @Test + void mojosHaveOneParent() { + ArchRuleDefinition.classes() + .that().haveSimpleNameEndingWith("Mojo") + .and().doNotHaveSimpleName("SafeMojo") + .should() + .beAssignableTo(SafeMojo.class) .check(new ClassFileImporter().importPackages("org.eolang.maven")); }