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

transformAndAppend

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

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.

The assertions the given assertionCreator creates are appended as hint in case the transformation fails. This is also the difference between calling transform and then Expect.addAssertionsCreatedBy in a second call as the sub-assertions assertionCreator creates would not be available in case the transformation cannot be carried out.

Return
The newly created Expect for the subject of type R resulting from the transformation.