doc / ch.tutteli.atrium.creating / IAssertionPlantNullable

IAssertionPlantNullable

interface IAssertionPlantNullable<out T> : IBaseAssertionPlant<T, IAssertionPlantNullable<T>>

Represents an assertion plant for nullable types.

It is the entry point for two assertion functions, the first makes the assumption that subject is null and the other that subject is not null. It only provides a reduced set of IReportingAssertionPlantNullable which is actually created when a user of Atrium is using an assertion verb function.

Parameters

T - The type of the subject of this IAssertionPlant.

Inherited Properties

subject

abstract val subject: T

The subject for which this plant will create IAssertions.

Inherited Functions

addAssertion

abstract fun addAssertion(assertion: IAssertion): A

Adds the given assertion to this plant.

Extension Functions

isNotNull

fun <T : Any> IAssertionPlantNullable<T?>.isNotNull(assertionCreator: IAssertionPlant<T>.() -> Unit): Unit

Makes the assertion that IAssertionPlantNullable.subject is not null and if so, uses assertionCreator which could create further assertions which are added as a group.

isNull

fun <T> IAssertionPlantNullable<T>.isNull(): Unit

Makes the assertion that IAssertionPlant.subject is null.

istNichtNull

fun <T : Any> IAssertionPlantNullable<T?>.istNichtNull(assertionCreator: IAssertionPlant<T>.() -> Unit): Unit

Makes the assertion that IAssertionPlantNullable.subject is not null and if so, uses assertionCreator which could create further assertions which are added as a group.

istNull

fun <T> IAssertionPlantNullable<T>.istNull(): Unit

Makes the assertion that IAssertionPlant.subject is null.

Inheritors

IReportingAssertionPlantNullable

interface IReportingAssertionPlantNullable<out T> : IAssertionPlantNullable<T>, IBaseReportingAssertionPlant<T, IAssertionPlantNullable<T>>