interface IAssertionPlantNullable<out T> : IAssertionPlantWithCommonFields<T>
Represents an assertion plant for nullable types.
In contrast to a IAssertionPlant it does not provide a method to create further IAssertions
(IAssertionPlant.createAndAddAssertion) nor a method to add assertions (IAssertionPlant.addAssertion)
and as consequence no method to check the assertions (IAssertionPlant.checkAssertions).
Yet, it provides one method isNull which immediately evaluates if the subject is null
as expected.
object AssertionDescription : ISimpleTranslatable
Use this description in an implementation to create an IOneMessageAssertion. |
abstract val commonFields: CommonFields<T>
CommonFields of this plant. |
|
open val subject: T
The subject for which this plant will create/check IAssertions. |
abstract fun isNull(): Unit
Makes the assertion that subject is |
fun <T : Any> IAssertionPlantNullable<T?>.isNotNull(): IAssertionPlant<T>
Makes the assertion that IAssertionPlant.subject is not null. fun <T : Any> IAssertionPlantNullable<T?>.isNotNull(createAssertions: IAssertionPlant<T>.() -> Unit): IAssertionPlant<T>
Makes the assertion that IAssertionPlant.subject is not null and if so, uses createAssertions which could create further assertions which are lazily evaluated at the end. |