doc / ch.tutteli.atrium.creating / IThrowableFluent

IThrowableFluent

interface IThrowableFluent

This interface is mainly here to simplify the KDoc generation (no need to define it twice, once in atrium-api-late-binding and once in atrium-impl-robstoll). Once Kotlin supports inline functions in interfaces, we will consolidate it to a proper API and get rid of ThrowableFluent in atrium-api-late-binding.

Types

AssertionDescription

enum class AssertionDescription : ISimpleTranslatable

Use these ISimpleTranslatables in the implementation to create corresponding IAssertions.

Properties

commonFields

abstract val commonFields: CommonFields<Throwable?>

Functions

toThrow

abstract fun <TExpected : Throwable> toThrow(expectedType: KClass<TExpected>): IAssertionPlant<TExpected>
abstract fun <TExpected : Throwable> toThrow(expectedType: KClass<TExpected>, createAssertions: IAssertionPlant<TExpected>.() -> Unit): IAssertionPlant<TExpected>

Use the overload with reified type parameter whenever possible.

Inheritors

ThrowableFluent

class ThrowableFluent : IThrowableFluent

Provides toThrow methods for making assertions about a Throwable which one expects was thrown.