doc / ch.tutteli.atrium.domain.creating.collectors / NonThrowingAssertionCollectorForExplanation

NonThrowingAssertionCollectorForExplanation

interface NonThrowingAssertionCollectorForExplanation : AssertionCollectorForExplanation (source)
Deprecated: Switch from Assert to Expect and use AssertionCollector.collectForComposition instead -- adds a failing assertion instead of throwing; this interface will be removed with 1.0.0

Represents an assertion collector meant for explanation which does not throw in case not a single Assertion was collected.

Inherited Functions

collect

open fun <T : Any> collect(warningCannotEvaluate: Translatable, maybeSubject: MaybeSubject<T>, assertionCreator: (CollectingAssertionPlant<T>.() -> Unit)?): List<Assertion>

Collects the Assertion created by assertionCreator and uses the given maybeSubject as CollectingAssertionPlant.subject if it is MaybeSubject.Present.

abstract fun <T, A : BaseAssertionPlant<T, A>, C : BaseCollectingAssertionPlant<T, A, C>> collect(warningCannotEvaluate: Translatable, maybeSubject: MaybeSubject<T>, collectingPlantFactory: (() -> T) -> C, assertionCreator: (C.() -> Unit)?): List<Assertion>

Collects the Assertion created by assertionCreator with the collecting assertion plant created by the given collectingPlantFactory and uses the given maybeSubject as BaseCollectingAssertionPlant.subject if it is MaybeSubject.Present.

collectNullable

open fun <T> collectNullable(warningCannotEvaluate: Translatable, maybeSubject: MaybeSubject<T>, assertionCreator: (CollectingAssertionPlantNullable<T>.() -> Unit)?): List<Assertion>

Collects the Assertion created by assertionCreator and uses the given maybeSubject as CollectingAssertionPlantNullable.subject if it is MaybeSubject.Present.