doc / ch.tutteli.atrium.creating / FeatureExpectOptionsChooser

FeatureExpectOptionsChooser

interface FeatureExpectOptionsChooser<R> (source)
Deprecated: Use FeatureExpectOptionsChooser from atrium-logic; will be removed with 0.17.0

Helper lambda to specify FeatureExpectOptions via convenience methods.

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

Functions

withDescription

open fun withDescription(description: String): Unit

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

abstract fun withDescription(description: Translatable): Unit

Uses the given description as custom description instead of the previously defined description.

withRepresentation

open fun withRepresentation(textRepresentation: String): Unit

Wraps the given textRepresentation into a Text and uses it as representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

abstract fun withRepresentation(representationProvider: (R) -> Any): Unit

Uses the given representationProvider to retrieve a representation which can be based on the current subject where this provided representation is used as new representation of the subject instead of the representation that has been defined so far (which defaults to the subject itself).

Companion Object Functions

invoke

operator fun <R> invoke(configuration: FeatureExpectOptionsChooser<R>.() -> Unit): FeatureExpectOptions<R>

Inheritors

FeatureExpectOptionsChooserImpl

class FeatureExpectOptionsChooserImpl<R> : FeatureExpectOptionsChooser<R>