atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.reporting / ExpectOptions

ExpectOptions

data class ExpectOptions<T> (source)

Additional (non-mandatory) options for the ExpectBuilder to create an Expect.

Constructors

<init>

ExpectOptions(assertionVerb: <ERROR CLASS>? = null, representationInsteadOfSubject: ((T) -> Any)? = null, reporter: <ERROR CLASS>? = null)

Additional (non-mandatory) options for the ExpectBuilder to create an Expect.

Properties

assertionVerb

val assertionVerb: <ERROR CLASS>?

Defines a custom assertion verb if not null.

reporter

val reporter: <ERROR CLASS>?

Defines a custom reporter if not null.

representationInsteadOfSubject

val representationInsteadOfSubject: ((T) -> Any)?

Defines a custom representation based on a present subject if not null.

Functions

merge

fun merge(options: ExpectOptions<T>): ExpectOptions<T>

Merges the given options with this object creating a new ExpectOptions where defined properties in options will have precedence over properties defined in this instance.

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.