doc / ch.tutteli.atrium.domain.creating.any.typetransformation.failurehandlers / FailureHandlerFactory

FailureHandlerFactory

interface FailureHandlerFactory
Deprecated: Use subjectChanger instead; will be removed with 1.0.0

Defines the minimum set of AnyTypeTransformation.FailureHandlers an implementation of the domain of Atrium has to provide.

Functions

newExplanatory

abstract fun <S : Any, T : Any> newExplanatory(): AnyTypeTransformation.FailureHandler<S, T>

Creates a AnyTypeTransformation.FailureHandler which wraps subsequent assertions into an AssertionGroup with an ExplanatoryAssertionGroupType so that the user of Atrium can see in reporting what one wanted to assert additionally.

newExplanatoryWithHint

abstract fun <S : Any, T : Any> newExplanatoryWithHint(showHint: () -> Boolean, failureHintFactory: () -> Assertion): AnyTypeTransformation.FailureHandler<S, T>

Creates a AnyTypeTransformation.FailureHandler which wraps subsequent assertions into an AssertionGroup with an ExplanatoryAssertionGroupType so that the user of Atrium can see in reporting what one wanted to assert additionally -- moreover it includes a hint about the subject which shall only be shown if showHint evaluates to true in which case the given failureHintFactory should be used to create the hint.

Inheritors

AnyTypeTransformationFailureHandlerFactoryBuilder

object AnyTypeTransformationFailureHandlerFactoryBuilder : FailureHandlerFactory

Delegates inter alia to the implementation of FailureHandlerFactory. In detail, it implements FailureHandlerFactory by delegating to failureHandlerFactory which in turn delegates to the implementation via loadSingleService.