assertk / assertk.assertions / hasRootCause

hasRootCause

(common, jvm) fun Assert<Throwable>.hasRootCause(cause: Throwable): Unit

Asserts the throwable is similar to the expected root cause, checking the type and message.