doc / ch.tutteli.atrium.api.infix.en_GB / notToBeNull

notToBeNull

inline infix fun <reified T : Any> Expect<T?>.notToBeNull(o: o): Expect<T> (source)

Expects that the subject of this expectation is not null and changes the subject to the non-nullable version.

Parameters

o - The filler object o.

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> (source)

Expects that the subject of this expectation is not null and that it holds all assertions the given assertionCreator creates.

Return
An Expect with the non-nullable type T (was T? before)