PropertyDeclarationShouldContext

Context receiver for writing declarative assertions on a PropertyDeclarationContext element. Provides easy access to all element properties and custom helper assertions.

Properties

Link copied to clipboard

The complete list of property declaration contexts in this test run scope.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Mutable collection where assertion failure messages are appended.

Link copied to clipboard

Functions

Link copied to clipboard
fun addViolation(message: String)

Appends a custom violation failure message to the assertion run.

Link copied to clipboard
fun assertAllAnnotationsOf(vararg names: String): <Error class: unknown class>

Asserts that this property is decorated with all of the specified annotations.

Link copied to clipboard
fun assertAnnotationOf(annotationName: String)

Asserts that this property is decorated with the specified annotation.

Link copied to clipboard
fun assertAnyAnnotationOf(vararg names: String): <Error class: unknown class>

Asserts that this property is decorated with at least one of the specified annotations.

Link copied to clipboard
fun check(condition: Boolean, message: String? = null)

Asserts condition is true, recording a violation with message when false. When message is omitted, a default message referencing element is used.

Link copied to clipboard
fun hasAllAnnotations(vararg names: String): Boolean

Checks if this property is decorated with all of the specified annotations.

Link copied to clipboard

Checks if this property is decorated with the specified annotation.

Link copied to clipboard
fun hasAnyAnnotation(vararg names: String): Boolean

Checks if this property is decorated with any of the specified annotations.