doc / ch.tutteli.atrium.domain.creating.changers / PostFinalStep

PostFinalStep

abstract class PostFinalStep<T, R, E : Expect<R>>
Deprecated: Use TransformationExecutionStep from atrium-logic; will be removed with 1.0.0

Step which kind of holds the state of a previous final step related to a subject change/feature extraction etc. and now allows to decide what should happen with it.

Parameters

T - The type of the current Expect, the current subject of the assertion respectively.

R - The type of the new Expect, the new subject of the assertion respectively.

Constructors

<init>

PostFinalStep(expect: Expect<T>, action: Expect<T>.() -> E, actionAndApply: Expect<T>.(Expect<R>.() -> Unit) -> Expect<R>)

Step which kind of holds the state of a previous final step related to a subject change/feature extraction etc. and now allows to decide what should happen with it.

Properties

action

val action: Expect<T>.() -> E

An action such as transform, extract etc. which creates and returns a new Expect of type R.

actionAndApply

val actionAndApply: Expect<T>.(Expect<R>.() -> Unit) -> Expect<R>

An action such as transform, extract etc. which not only creates and returns a new Expect of type R but also applies a given assertionCreator lambda.

expect

val expect: Expect<T>

Expect which was involved in the building process and holds assertion for the initial subject.

Functions

addToFeature

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

Creates a new Expect for the feature, adds all assertions the given assertionCreator creates for it and returns the new Expect.

addToInitial

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

Creates a new Expect for the feature, adds all assertions the given assertionCreator creates for it and returns the initial Expect.

collect

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

Collects the assertions the given assertionCreator might create for the new Expect of the feature and returns them as a single Assertion

getExpectOfFeature

fun getExpectOfFeature(): E

Returns the newly created Expect for the feature.

Inheritors

ChangedSubjectPostStep

class ChangedSubjectPostStep<T, R> : PostFinalStep<T, R, Expect<R>>

Option step which allows to decide what should be done with the transformed subject of type R.

ExtractedFeaturePostStep

class ExtractedFeaturePostStep<T, R> : PostFinalStep<T, R, FeatureExpect<T, R>>

Option step which allows to decide what should be done with the extracted feature of type R.