atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating.collectors / AssertionCollectorBuilder

AssertionCollectorBuilder

object AssertionCollectorBuilder (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 loadSingleService.

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> collect(maybeSubject: <ERROR CLASS><T>, assertionCreator: <ERROR CLASS><T>.() -> Unit): <ERROR CLASS>
fun <T, A, C> collect(subjectProvider: () -> T, collectingPlantFactory: (() -> T) -> C, assertionCreator: C.() -> Unit): <ERROR CLASS>

collectForComposition

fun <T> collectForComposition(maybeSubject: <ERROR CLASS><T>, assertionCreator: <ERROR CLASS><T>.() -> Unit): <ERROR CLASS>

collectOrExplain

fun <T, A, C> collectOrExplain(safeToCollect: Boolean, warningCannotEvaluate: <ERROR CLASS>, subjectProvider: () -> T, collectingPlantFactory: (() -> T) -> C, assertionCreator: C.() -> Unit): <ERROR CLASS>

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.