inline infix fun <reified T : Any> Expect<T?>.notToBeNull(o: o): Expect<T>
Expects that the subject of the assertion is not null and changes the subject to the non-nullable version.
o
- The filler object o.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect with the non-nullable type T (was T?
before).
Since
0.12.0
inline infix fun <reified T : Any> Expect<T?>.notToBeNull(noinline assertionCreator: Expect<T>.() -> Unit): Expect<T>
Expects that the subject of the assertion is not null and that it holds all assertions the given assertionCreator creates.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect with the non-nullable type T (was T?
before)