doc / ch.tutteli.atrium.logic.creating.transformers / TransformationExecutionStep

TransformationExecutionStep

interface TransformationExecutionStep<T, R, E : Expect<R>>

Defines the minimal contract for the execution step of a subject transformation process - i.e. the step after choosing all options.

Functions

collect

abstract fun collect(assertionCreator: Expect<R>.() -> Unit): Assertion

Finishes the transformation process by collecting the assertions the given assertionCreator creates for the subject of type R resulting from the transformation and returns the assertions as a single Assertion.

collectAndAppend

abstract fun collectAndAppend(assertionCreator: Expect<R>.() -> Unit): Expect<T>

Finishes the transformation process by appending the Assertion which is returned when calling collect with the given assertionCreator.

transform

abstract fun transform(): E

Finishes the transformation process by simply performing the transformation as such.

transformAndAppend

abstract fun transformAndAppend(assertionCreator: Expect<R>.() -> Unit): Expect<R>

Finishes the transformation process by carrying the transformation out and appending the assertions the given assertionCreator creates for the subject of type R resulting from the transformation as single assertion.

Extension Functions

collectAndLogicAppend

fun <T, R> TransformationExecutionStep<T, R, *>.collectAndLogicAppend(assertionCreator: AssertionContainer<R>.() -> Assertion): Expect<T>

Finishes the transformation process by appending the Assertion which is returned when calling TransformationExecutionStep.collectAndAppend with _logicAppend and the given assertionCreator.

Inheritors

BaseTransformationExecutionStep

abstract class BaseTransformationExecutionStep<T, R, E : Expect<R>> : TransformationExecutionStep<T, R, E>

Step which has all necessary information to perform a subject transformation (subject change/feature extraction etc.) and now allows to decide how it should be done, especially regarding potential sub-assertions which should be applied to the new resulting subject.

ExecutionStep

interface ExecutionStep<T, R> : TransformationExecutionStep<T, R, FeatureExpect<T, R>>

Step which allows to decide how the transformation shall be executed.

ExecutionStep

interface ExecutionStep<T, R> : TransformationExecutionStep<T, R, Expect<R>>

Step which allows to decide how the transformation shall be executed.