doc / ch.tutteli.atrium.logic.creating.transformers.impl / ThrowableThrownFailureHandler

ThrowableThrownFailureHandler

class ThrowableThrownFailureHandler<T : Throwable?, R> : SubjectChanger.FailureHandler<T, R> (source)

Constructors

<init>

ThrowableThrownFailureHandler()

Functions

createAssertion

fun createAssertion(container: AssertionContainer<T>, descriptiveAssertion: Assertion, maybeAssertionCreator: Option<Expect<R>.() -> Unit>): Assertion

Creates the failing assertion most likely based on the given descriptiveAssertion -- which in turn is based on the previously specified description, representation etc. -- and should incorporate the assertions maybeAssertionCreator would have created for the new subject as explanatory assertions.

Companion Object Functions

createChildHint

fun createChildHint(throwable: Throwable, child: Throwable, childDescription: Translatable): AssertionGroup

Creates a hint for a given child of the given throwable using the given childDescription.

propertiesOfThrowable

fun propertiesOfThrowable(throwable: Throwable, explanation: Assertion = createExplanation(throwable)): AssertionGroup

Returns an AssertionGroup with an ExplanatoryAssertionGroupType containing properties of the given throwable.