ExpectationStateCallbackBuilder

A builder for state callbacks that get added to an expectation.

This is the object used for the right-hand side of the expect() ... DSL.

Constructors

Link copied to clipboard
constructor(builderFunc: (StateCallback<T, R, *>?) -> Expectation<T, R>)

Functions

Link copied to clipboard
open override fun build(): Expectation<T, R>

Builds this expectation

Link copied to clipboard
open override fun <V> compose(stateCallback: StateCallback<T, R, V>): StateCallbackBuilder<T, V>

Compose the current state callback with the provided stateCallback.

Link copied to clipboard
open infix fun storeIn(argName: NodeParameterKey<T, R>): StateCallbackBuilder<T, R>

Signals that the expectation should store its result using the given argument key.

open infix fun storeIn(rawArg: RawKey)

Signals that the expectation should store its result using the given raw key.

open infix fun storeIn(property: KProperty1<T, R?>): StateCallbackBuilder<T, R>

Signals that the expectation should store its result using the given property.

Link copied to clipboard
open infix fun <V> transform(transformer: (R) -> V): StateCallbackBuilder<T, V>

Transform the current value using the given lambda.