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

ExplainingAssertionCollectorOption

object ExplainingAssertionCollectorOption (source)
Deprecated: Switch from Assert to Expect and use ExpectImpl.collector.collectForComposition; will be removed with 1.0.0

Delegates inter alia to the implementation of ThrowingAssertionCollectorForExplanation and NonThrowingAssertionCollectorForExplanation.

Properties

doNotThrowIfNoAssertionIsCollected

val doNotThrowIfNoAssertionIsCollected: <ERROR CLASS>

Choosing this option will ignore use cases where not a single Assertion was collected.

throwIfNoAssertionIsCollected

val throwIfNoAssertionIsCollected: <ERROR CLASS>

Choosing this option causes the AssertionCollector to throw an IllegalArgumentException in case not a single Assertion was collected.

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.