doc / ch.tutteli.atrium.logic.creating.transformers / SubjectChangerBuilder / TransformationStep

TransformationStep

interface TransformationStep<T>

Step to define the transformation which yields the new subject wrapped into a Some if the transformation as such can be carried out; otherwise None.

Parameters

T - the type of the current subject.

Properties

container

abstract val container: AssertionContainer<T>

The previously specified assertion container to which the new Expect will delegate.

description

abstract val description: Translatable

The previously specified description which describes the kind of subject change.

representation

abstract val representation: Any

The previously specified representation of the change.

Functions

withTransformation

abstract fun <R> withTransformation(transformation: (T) -> Option<R>): SubjectChangerBuilder.FailureHandlerStep<T, R>

Defines the new subject, most likely based on the current subject (but does not need to be).

Companion Object Functions

invoke

operator fun <T> invoke(container: AssertionContainer<T>, description: Translatable, representation: Any): SubjectChangerBuilder.TransformationStep<T>

Creates a TransformationStep in the context of the SubjectChangerBuilder.

Inheritors

TransformationStepImpl

class TransformationStepImpl<T> : SubjectChangerBuilder.TransformationStep<T>