assertCallerAnnotation

open fun assertCallerAnnotation(annotationClass: Class<out Annotation>, message: String)

Ensures if the caller of the method calling this method is annotated with the specified annotation.

Parameters

annotationClass

the expected annotation class

message

the message that will included the exception if the check fails.

Throws

if the caller if the caller is not annotated as expected.