assertFailsWith
Asserts that a block fails with a specific exception of type T being thrown.
If the assertion fails, the specified message is used unless it is null as a prefix for the failure message.
Since Kotlin
1.0Return
An exception of the expected exception type T that successfully caught. The returned exception can be inspected further, for example by asserting its property values.
Asserts that a block fails with a specific exception of type exceptionClass being thrown.
Since Kotlin
1.0Return
An exception of the expected exception type T that successfully caught. The returned exception can be inspected further, for example by asserting its property values.
Asserts that a block fails with a specific exception of type exceptionClass being thrown.
If the assertion fails, the specified message is used unless it is null as a prefix for the failure message.
Since Kotlin
1.0Return
An exception of the expected exception type T that successfully caught. The returned exception can be inspected further, for example by asserting its property values.