ClassesShouldCompositeAssertions

Fluent API for defining assertion rules on Kotlin classes.

Inheritors

Properties

Link copied to clipboard

Filter or assertion criteria for builder.

Functions

Link copied to clipboard

Asserts that all member functions in selected classes satisfy the assertions specified in the block.

Link copied to clipboard
open fun allOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that all of the nested assertion blocks are satisfied.

Link copied to clipboard

Asserts that all member properties in selected classes satisfy the assertions specified in the block.

Link copied to clipboard
open fun anyOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that at least one of the nested assertion blocks is satisfied.

Link copied to clipboard
open fun noneOf(vararg blocks: ClassesShould.() -> Unit): ClassesRuleBuilder

Asserts that none of the nested assertion blocks are satisfied.

Link copied to clipboard

Asserts that selected classes do not expose types annotated with the specified annotations in their property, function return, or parameter signatures.

Asserts that selected classes do not expose types annotated with the specified annotation in their property, function return, or parameter signatures.

Asserts that selected classes do not expose types annotated with any of the specified annotations in their property, function return, or parameter signatures.

Link copied to clipboard
open infix fun satisfy(assertion: (ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy custom assertion assertion.

Satisfies an arbitrary custom assertion logic with custom violations builder.

open infix fun satisfy(description: String): ClassesRuleBuilder

Asserts that selected classes satisfy custom description description.

open fun satisfy(description: String, predicate: (ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy custom predicate predicate with description.

open fun satisfy(id: String, description: String? = null, predicate: SatisfyContext<ClassDeclaration>.(ClassDeclaration) -> Boolean): ClassesRuleBuilder

Asserts that selected classes satisfy a custom predicate within a SatisfyContext block identified by id and optional description.