Skip to content

Instantly share code, notes, and snippets.

@BenjaminKlatt
Created October 12, 2020 15:57
Show Gist options
  • Save BenjaminKlatt/a6abbc575e9f8413e6285d3dc06bb31b to your computer and use it in GitHub Desktop.
Save BenjaminKlatt/a6abbc575e9f8413e6285d3dc06bb31b to your computer and use it in GitHub Desktop.
ArchUnit Naming Conventions Test
@ArchTest
private static ArchRule controllers_should_be_suffixed =
classes()
.that().areAnnotatedWith(RestController.class)
.should().haveSimpleNameEndingWith("Controller")
.and().resideInAPackage("..controller..")
.because("Erkennbarkeit Controller Hauptklasse");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment