inline fun <reified TExpected : Throwable> Expect<out Result<*>>.isFailure(): Expect<TExpected>
(source)
Expects that the subject of the assertion (a Result) is a Failure and that it encapsulates an exception of type TExpected.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect with the new type TExpected
Since
0.9.0
inline fun <reified TExpected : Throwable> Expect<out Result<*>>.isFailure(noinline assertionCreator: Expect<TExpected>.() -> Unit): Expect<TExpected>
(source)
Expects that the subject of the assertion (a Result) is a Failure, it encapsulates an exception of type TExpected and that the exception holds all assertions the given assertionCreator creates.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect with the new type TExpected
Since
0.9.0