fun <R, T : () -> R> Expect<T>.notToThrow(): Expect<R>
Expects that no Throwable is thrown at all when calling the subject (a lambda with arity 0, i.e. without arguments) and changes the subject of the assertion to the return value of type R.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect with the new type R.
infix fun <R, T : () -> R> Expect<T>.notToThrow(assertionCreator: Expect<R>.() -> Unit): Expect<R>
Expects that no Throwable is thrown at all when calling the subject (a lambda with arity 0, i.e. without arguments) and that the corresponding return value holds all assertions the given assertionCreator creates.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.