doc / ch.tutteli.atrium.domain.creating.throwable.thrown / ThrowableThrown / Creator / executeActAndCreateAssertion


abstract fun executeActAndCreateAssertion(throwableThrownBuilder: ThrowableThrown.Builder, description: Translatable, expectedType: KClass<TExpected>, assertionCreator: AssertionPlant<TExpected>.() -> Unit): Unit
Deprecated: Will be removed with 1.0.0

Executes the act lambda of the given throwableThrownBuilder, catches any thrown Throwable, creates based on it a corresponding Assertion representing the sophisticated assertion and also checks whether it holds or not.


throwableThrownBuilder - The ThrowableThrown.Builder containing inter alia the act lambda.

description - The description of the resulting DescriptiveAssertion.

expectedType - The expected type of the Throwable used for casting and probably in reporting.

assertionCreator - The assertion creator which defines subsequent assertions for the Throwable in case it was thrown as expected and is of the expected type TExpected.