assertHaveAnnotationOf

fun List<ClassDeclaration>.assertHaveAnnotationOf(vararg annotationFqNames: String)

Asserts that all class declarations have at least one of the specified annotations. Matches either the annotation's simple name or its fully qualified name (FQN).

Example:

classes.assertHaveAnnotationOf("org.springframework.stereotype.Repository", "Repository")

Parameters

annotationFqNames

The annotation names or fully qualified names. At least one must match.

Throws

if any class is not annotated with any of the specified annotations.


fun KontureScope.assertHaveAnnotationOf(vararg annotationFqNames: String)

Asserts that all class declarations in the scope have at least one of the specified annotations. Matches either the annotation's simple name or its fully qualified name (FQN).

Parameters

annotationFqNames

The annotation names or fully qualified names. At least one must match.

Throws

if any class is not annotated with any of the specified annotations.