Last active
October 12, 2020 21:30
-
-
Save BenjaminKlatt/4008cd5849dedaa0c1983302b6823a59 to your computer and use it in GitHub Desktop.
ArchUnit Freeze Feature
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# store location | |
freeze.store.default.path=src/test/resources/frozen | |
# allow creation of a new violation store (default: false) | |
freeze.store.default.allowStoreCreation=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ArchTest | |
private static ArchRule controllers_should_be_suffixed = | |
freeze( | |
classes() | |
.that().areAnnotatedWith(RestController.class) | |
.should().haveSimpleNameEndingWith("Controller") | |
.andShould().resideInAPackage("..controller..") | |
.because("controllers must use business services instead of the persistence layer") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment