RootExpectOptionsChooserImpl

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
Link copied to clipboard
open override fun <I : Any> prependChainedComponents(kClass: KClass<I>, factories: Sequence<ComponentFactory>)
Link copied to clipboard
open override fun <I : Any> withComponent(kClass: KClass<I>, factory: (ComponentFactoryContainer) -> I)

Expects a factory which creates the component of type I which is used instead of the currently specified factory.

Link copied to clipboard

Convenience function which infers the KClass usually required for RootExpectBuilder.OptionsChooser.withComponent.

Link copied to clipboard
open fun withRepresentation(textRepresentation: String)

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).

open override fun withRepresentation(representationProvider: (T) -> Any)

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

Link copied to clipboard
open override fun <I : Any> withSingletonComponent(kClass: KClass<I>, factory: (ComponentFactoryContainer) -> I)

Expects a factory which creates the component of type I which is used instead of the currently specified factory.

Link copied to clipboard
open fun withVerb(verb: String)

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

open override fun withVerb(verb: Translatable)

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