doc / ch.tutteli.atrium.logic.creating / RootExpectBuilder / OptionsStep

OptionsStep

interface OptionsStep<T> (source)

Step which allows to override previously defined properties -- such as use a different expectation verb -- but also allows to define options where usually a default value is used, such as use a custom Reporter.

Parameters

T - the type of the subject.

Properties

expectationVerb

abstract val expectationVerb: Translatable

The previously defined expectation verb.

subject

abstract val subject: T

The previously specified subject of the expectation.

Functions

withOptions

open fun withOptions(configuration: RootExpectBuilder.OptionsChooser<T>.() -> Unit): RootExpectBuilder.FinalStep<T>

Allows to define the RootExpectOptions via an OptionsChooser-lambda which provides convenience functions.

abstract fun withOptions(rootExpectOptions: RootExpectOptions<T>): RootExpectBuilder.FinalStep<T>

Uses the given rootExpectOptions.

withoutOptions

abstract fun withoutOptions(): RootExpectBuilder.FinalStep<T>

States explicitly that no optional RootExpectOptions are defined, which means, build will create a new Expect based on the previously defined mandatory options but without any optional options or in other words, the default values are used for the optional options.

Companion Object Functions

invoke

operator fun <T> invoke(subject: T, expectationVerb: Translatable): RootExpectBuilder.OptionsStep<T>

Inheritors

OptionsStepImpl

class OptionsStepImpl<T> : RootExpectBuilder.OptionsStep<T>