assert Throwable
Example usage:
import arrow.fx.coroutines.assertThrowable
fun main() {
val exception = assertThrowable<IllegalArgumentException> {
throw IllegalArgumentException("Talk to a duck")
}
require("Talk to a duck" == exception.message)
}Content copied to clipboard
See also
Assertions. assert Throws