Eric
12/20/2023, 7:16 PM@PreAuthorize
annotation or have it as a meta-annotation.
that(methods).all {
get { annotations.toList() }.any {
get { annotationClass }.isEqualTo(PreAuthorize::class)
// or...
get { annotationClass.annotations }.any { get { annotationClass }.isEqualTo(PreAuthorize::class) }
}
}
Eric
12/20/2023, 7:20 PMthat(methods).all {
get { annotations.toList() }.any {
assertThat("has the @PreAuthorize annotation or meta-annotation ") { annotation ->
annotation.annotationClass == PreAuthorize::class ||
annotation.annotationClass.annotations
.any { meta -> meta.annotationClass == PreAuthorize::class }
}
}
}