strikt-core / strikt.assertions / failedWith

failedWith

fun <reified E : Throwable> Builder<Result<*>>.failedWith(): Builder<E>

Asserts that the subject is a isFailure result that threw an exception assignable to E and maps this assertion to an assertion over that exception.

See Also

Result.isFailure