FailureHandlerStepImpl
class FailureHandlerStepImpl<SubjectT, SubjectAfterChangeT>(val transformationStep: SubjectChangerBuilder.TransformationStep<SubjectT>, val transformation: (SubjectT) -> Option<SubjectAfterChangeT>) : SubjectChangerBuilder.FailureHandlerStep<SubjectT, SubjectAfterChangeT> (source)
Constructors
Link copied to clipboard
constructor(transformationStep: SubjectChangerBuilder.TransformationStep<SubjectT>, transformation: (SubjectT) -> Option<SubjectAfterChangeT>)
Properties
Functions
Link copied to clipboard
Skips this step by using withDefaultFailureHandler and calls FinalStep.build.
Link copied to clipboard
open override fun withDefaultFailureHandler(): SubjectChangerBuilder.FinalStep<SubjectT, SubjectAfterChangeT>
Uses the default SubjectChanger.FailureHandler which builds the failing assertion based on the specified TransformationStep.description and TransformationStep.representation and includes the assertions a given assertionCreator lambda would create.
Link copied to clipboard
open override fun withFailureHandler(failureHandler: SubjectChanger.FailureHandler<SubjectT, SubjectAfterChangeT>): SubjectChangerBuilder.FinalStep<SubjectT, SubjectAfterChangeT>
Uses the given failureHandler as SubjectChanger.FailureHandler to create the failing assertion in case the subject change fails.
Link copied to clipboard
open fun <SubjectIntermediateT> withFailureHandlerAdapter(failureHandler: SubjectChanger.FailureHandler<SubjectIntermediateT, SubjectAfterChangeT>, map: (SubjectT) -> SubjectIntermediateT): SubjectChangerBuilder.FinalStep<SubjectT, SubjectAfterChangeT>
Uses the given failureHandler as SubjectChanger.FailureHandler to create the failing assertion in case the subject change fails but previously maps the subject from SubjectT to SubjectIntermediateT as the failure handler only deals with SubjectIntermediateT subjects.