FileDeclarationShouldContext
Context receiver for writing declarative assertions on a FileDeclarationContext element. Provides easy access to all element properties and custom helper assertions.
Properties
Filter or assertion criteria for all files.
Filter or assertion criteria for classes.
Filter or assertion criteria for declaration.
Filter or assertion criteria for element.
Filter or assertion criteria for module path.
Filter or assertion criteria for package name.
Filter or assertion criteria for top level functions.
Filter or assertion criteria for top level properties.
Filter or assertion criteria for violations.
Functions
Appends a custom violation failure message to the assertion run.
Asserts that this file does not use any wildcard star imports.
Asserts that this file contains at most one class declaration.
Checks if this file contains any classes matching the given predicate.
Checks if this file contains any import with matching package path segment strings.