use of com.tngtech.archunit.lang.ArchRule in project waltz by khartec.
the class DaoArchitectureComplianceTest method daosNeedRepositoryAnnotation.
@Test
public void daosNeedRepositoryAnnotation() {
ArchRule rule = classes().that().areNotInterfaces().and().doNotHaveModifier(ABSTRACT).and().resideInAPackage("..finos..").and().haveNameMatching(".*Dao").should().beAnnotatedWith(Repository.class);
rule.check(waltzAndJavaUtilClasses);
}
use of com.tngtech.archunit.lang.ArchRule in project waltz by khartec.
the class DaoArchitectureComplianceTest method methodsPrefixedFindShouldReturnCollections.
@Test
public void methodsPrefixedFindShouldReturnCollections() {
ArchRule rule = classes().that().areNotInterfaces().and().haveNameMatching(".*Dao").should(haveFindMethodsThatReturnCollectionsOrMapsOrOptionals);
rule.check(waltzAndJavaUtilClasses);
}
use of com.tngtech.archunit.lang.ArchRule in project waltz by khartec.
the class DaoArchitectureComplianceTest method daoMethodsShouldNotUseSelectFrom.
@Test
public void daoMethodsShouldNotUseSelectFrom() {
ArchRule rule = classes().that().areNotInterfaces().and().haveNameMatching(".*Dao").should(notHaveDaoMethodsWhichCallSelectFrom);
rule.check(waltzOnlyClasses);
}
use of com.tngtech.archunit.lang.ArchRule in project waltz by khartec.
the class EndpointArchitectureComplianceTest method extractorsNeedServiceAnnotation.
@Test
public void extractorsNeedServiceAnnotation() {
ArchRule rule = classes().that().areAssignableTo(DataExtractor.class).and().doNotHaveModifier(ABSTRACT).and().doNotHaveSimpleName("DataExtractor").should().haveNameMatching(".*Extractor").andShould().beAnnotatedWith(Service.class);
rule.check(waltzOnlyClasses);
}
use of com.tngtech.archunit.lang.ArchRule in project waltz by khartec.
the class ModelArchitectureComplianceTest method commandsNeedMarkerInterface.
@Test
public void commandsNeedMarkerInterface() {
ArchRule rule = classes().that().areNotInterfaces().and().haveNameMatching(".*Command").should().implement(Command.class);
rule.check(waltzOnlyClasses);
}
Aggregations