atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating.changers / SubjectChangerBuilder

SubjectChangerBuilder

interface SubjectChangerBuilder (source)

Defines the contract for sophisticated change subject processes.

Types

DeprecatedKindStep

interface DeprecatedKindStep<T>

Step where one has to decide the kind of subject change.

DescriptionRepresentationStep

interface DescriptionRepresentationStep<T>

Step which allows to specify the description and representation of the change.

FailureHandlerOption

interface FailureHandlerOption<T, R>

Optional step which allows to specify a custom SubjectChanger.FailureHandler.

FinalStep

interface FinalStep<T, R>

Final step in the change-subject-process, creates a ChangedSubjectPostStep ased on the previously specified options.

KindStep

interface KindStep<T>

Step where one has to decide the kind of subject change.

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.

Companion Object Functions

create

fun <T> create(expect: <ERROR CLASS><T>): SubjectChangerBuilder.KindStep<T>

Entry point to use the SubjectChangerBuilder.

fun <T> create(originalPlant: <ERROR CLASS><T>): SubjectChangerBuilder.DeprecatedKindStep<T>

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.