doc / ch.tutteli.atrium.assertions.any.typetransformation / AnyTypeTransformation / TypeTransformationFailureHandler

TypeTransformationFailureHandler

interface TypeTransformationFailureHandler<in T : Any, out TSub : Any>
Deprecated: Use the interface from package domain.creating; will be removed with 1.0.0

A handler which decides how the lambda -- which could have created subsequent assertions for the transformed AssertionPlant.subject if the transformation of the AssertionPlant.subject to type TSub did not fail -- should be used in reporting.

Parameters

T - The type of AssertionPlant.subject.

TSub - The type to which AssertionPlant.subject should have been transformed to.

Functions

createAndAddAssertionToPlant

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

Makes something with the given assertionCreator lambda; might add assertions to subjectPlant.

Inheritors

ExplanatoryTypeTransformationFailureHandler

class ExplanatoryTypeTransformationFailureHandler<T : Any, out TSub : T> : AnyTypeTransformation.TypeTransformationFailureHandler<T, TSub>

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