doc / ch.tutteli.atrium.assertions.any.typetransformation / ExplanatoryTypeTransformationFailureHandler

ExplanatoryTypeTransformationFailureHandler

class ExplanatoryTypeTransformationFailureHandler<T : Any, out TSub : T> : AnyTypeTransformation.TypeTransformationFailureHandler<T, TSub>
Deprecated: Use AssertImpl.any.typeTransformation.failureHandlers.newExplanatory; will be removed with 1.0.0

Represents an AnyTypeTransformation.TypeTransformationFailureHandler which wraps subsequent assertions into an AssertionGroup with an ExplanatoryAssertionGroupType.

Parameters

T - The type of the AssertionPlant.subject.

T - The type to which the AssertionPlant.subject should have been down-casted.

Constructors

<init>

ExplanatoryTypeTransformationFailureHandler()

Represents an AnyTypeTransformation.TypeTransformationFailureHandler which wraps subsequent assertions into an AssertionGroup with an ExplanatoryAssertionGroupType.

Functions

createAndAddAssertionToPlant

fun createAndAddAssertionToPlant(warningTransformationFailed: Translatable, subjectPlant: BaseAssertionPlant<T?, *>, failingAssertion: Assertion, assertionCreator: AssertionPlant<TSub>.() -> Unit): Unit

Wraps the assertions which might be created by assertionCreator into an AssertionGroup with an ExplanatoryAssertionGroupType and adds it to the given subjectPlant.