kotest-assertions-core / io.kotest.matchers.throwable / kotlin.Throwable

Extensions for kotlin.Throwable

shouldHaveCause

fun Throwable.shouldHaveCause(block: (Throwable) -> Unit = {}): Unit

shouldHaveCauseInstanceOf

fun <T : Throwable> Throwable.shouldHaveCauseInstanceOf(): Unit

shouldHaveCauseOfType

fun <T : Throwable> Throwable.shouldHaveCauseOfType(): Unit

shouldHaveMessage

infix fun Throwable.shouldHaveMessage(message: String): Unit

shouldNotHaveCause

fun Throwable.shouldNotHaveCause(): Unit

shouldNotHaveCauseInstanceOf

fun <T : Throwable> Throwable.shouldNotHaveCauseInstanceOf(): Unit

shouldNotHaveCauseOfType

fun <T : Throwable> Throwable.shouldNotHaveCauseOfType(): Unit

shouldNotHaveMessage

infix fun Throwable.shouldNotHaveMessage(message: String): Unit