doc / ch.tutteli.atrium.domain.builders.creating.changers / SubjectChangerBuilder / TransformationStep

TransformationStep

interface TransformationStep<T> (source)

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

description

abstract val description: Translatable

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

originalExpect

abstract val originalExpect: Expect<T>

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

representation

abstract val representation: Any

The previously specified representation of the change.

Functions

withTransformation

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

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

Companion Object Functions

create

fun <T> create(originalAssertionContainer: Expect<T>, description: Translatable, representation: Any): SubjectChangerBuilder.TransformationStep<T>

Creates a TransformationStep in the context of the SubjectChangerBuilder.