doc / ch.tutteli.atrium.assertions.throwable.thrown.builders / ThrowableThrownBuilder

ThrowableThrownBuilder

class ThrowableThrownBuilder : ThrowableThrown.Builder (source)
Deprecated: Use AssertImpl; will be removed with 1.0.0

Represents the deprecated entry point of the fluent API of sophisticated a Throwable was thrown assertions.

It contains the assertionVerb and reporter which will be used to create an AssertionPlantNullable as well as the act function which is expected to throw a Throwable.

Constructors

<init>

ThrowableThrownBuilder(assertionVerb: Translatable, act: () -> Unit, reporter: Reporter)

Represents the entry point of the fluent API of sophisticated a Throwable was thrown assertions.

Properties

act

val act: () -> Unit

The function which is expected to throw a Throwable.

assertionVerb

val assertionVerb: Translatable

The assertion verb which will be used inter alia in reporting.

reporter

val reporter: Reporter

The reporter which will be used for a CoreFactory.newThrowingAssertionChecker.

Extension Functions

toThrow

fun <TExpected : Throwable> ThrowableThrown.Builder.toThrow(assertionCreator: Assert<TExpected>.() -> Unit): Unit

Makes the assertion that the thrown Throwable is of type TExpected and holds all assertions the assertionCreator might create in addition.

toThrow

infix fun <TExpected : Throwable> ThrowableThrown.Builder.toThrow(assertionCreator: Assert<TExpected>.() -> Unit): Unit

Makes the assertion that the thrown Throwable is of type TExpected and holds all assertions the assertionCreator might create in addition.

toThrow

fun <TExpected : Throwable> ThrowableThrown.Builder.toThrow(assertionCreator: Assert<TExpected>.() -> Unit): Unit

Makes the assertion that the thrown Throwable is of type TExpected and holds all assertions the assertionCreator might create in addition.

toThrow

infix fun <TExpected : Throwable> ThrowableThrown.Builder.toThrow(assertionCreator: Assert<TExpected>.() -> Unit): Unit

Makes the assertion that the thrown Throwable is of type TExpected and holds all assertions the assertionCreator might create in addition.

wirft

fun <TExpected : Throwable> ThrowableThrown.Builder.wirft(assertionCreator: Assert<TExpected>.() -> Unit): Unit

Makes the assertion that the thrown Throwable is of type TExpected and holds all assertions the assertionCreator might create in addition.

fun <TExpected : Throwable> ThrowableThrown.Builder.wirft(): Unit

Makes the assertion that the thrown Throwable is of type TExpected.

wirftNichts

fun ThrowableThrown.Builder.wirftNichts(): Unit

Makes the assertion that no Throwable is thrown at all.