doc / ch.tutteli.atrium.domain.builders.creating.collectors / AssertionCollectorBuilder

AssertionCollectorBuilder

object AssertionCollectorBuilder : AssertionCollector (source)

Delegates inter alia to the implementation of AssertionCollector. In detail, it implements AssertionCollector by delegating to assertionCollector which in turn delegates to the implementation via ServiceLoader.

Properties

forExplanation

val forExplanation: ExplainingAssertionCollectorOption

Returns ExplainingAssertionCollectorOption providing options to create an assertion collector which collects assertions in the context of explaining assertions. It inter alia delegates to the implementation of ThrowingAssertionCollectorForExplanation and NonThrowingAssertionCollectorForExplanation.

Functions

collect

fun <T : Any> collect(subjectProvider: () -> T, subPlantAndAssertionCreator: CollectingAssertionPlant<T>.() -> Unit): AssertionGroup

Use this function if you want to make Assertion about a feature or you perform a type transformation or any other action which results in a sub-AssertionPlant being created and you do not require this resulting plant.

Inherited Functions

collect

open fun <T : Any> collect(plant: AssertionPlant<T>, subPlantAndAssertionCreator: CollectingAssertionPlant<T>.() -> Unit): AssertionGroup

Use this function if you want to make Assertion about a feature or you perform a type transformation or any other action which results in a sub-AssertionPlant being created and you do not require this resulting plant.