doc / ch.tutteli.atrium.domain.builders.reporting / ExpectBuilder / OptionsChooser

OptionsChooser

interface OptionsChooser

Helper lambda to specify ExpectOptions via convenience methods.

Calling multiple times the same method overrides the previously defined value.

Functions

withNullRepresentation

abstract fun withNullRepresentation(representation: Any): Unit

Use the given representation as custom representation for null.

withReporter

abstract fun withReporter(reporter: Reporter): Unit

Uses the given reporter instead of the default reporter.

withRepresentation

abstract fun withRepresentation(representation: Any): Unit

Uses the given representation as representation of the subject instead of using the subject as such to represent itself.

withTextRepresentation

open fun withTextRepresentation(representation: String): Unit

Wraps the given representation into a RawString and uses it as representation of the subject instead of the so far defined representation (which defaults to the subject as such).

withVerb

open fun withVerb(verb: String): Unit

Wraps the given verb into an Untranslatable and passes it to the overload which expects a Translatable -- this is then used as custom assertion verb instead of the previously defined verb.

abstract fun withVerb(verb: Translatable): Unit

Uses the given verb as assertion verb instead of the previously defined verb.

Companion Object Functions

createAndBuild

fun createAndBuild(configuration: ExpectBuilder.OptionsChooser.() -> Unit): ExpectOptions