doc / ch.tutteli.atrium.api.cc.en_GB / notToBeNullBut

notToBeNullBut

inline fun <reified T : Any> AssertionPlantNullable<T?>.notToBeNullBut(expected: T): Unit (source)

Makes the assertion that AssertionPlantNullable.subject is not null but the expected value.

Is a shortcut for notToBeNull { toBe(expected) }

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
Notice, that this assertion function cannot provide a fluent API because it depends on whether the first assertion (AssertionPlant.subject is not null) holds or not.