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


interface Creator<TExpected : Throwable>
Deprecated: Will be removed with 1.0.0

Represents the final step of a sophisticated a Throwable was thrown assertion builder which creates the AssertionGroup as such.


TExpected - The type of the Throwable which is expected to be thrown.



abstract fun executeActAndCreateAssertion(throwableThrownBuilder: ThrowableThrown.Builder, description: Translatable, expectedType: KClass<TExpected>, assertionCreator: AssertionPlant<TExpected>.() -> Unit): Unit

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.


abstract fun executeActAssertNothingThrown(throwableThrownBuilder: ThrowableThrown.Builder): Unit

Executes the act lambda of the given throwableThrownBuilder and catches thrown Throwables (if there are any) and correspondingly creates an assertion where it is expected that nothing is thrown..