doc / ch.tutteli.atrium.creating / CollectingAssertionPlantNullable

CollectingAssertionPlantNullable

interface CollectingAssertionPlantNullable<out T> : AssertionPlantNullable<T>, BaseCollectingAssertionPlant<T, AssertionPlantNullable<T>, CollectingAssertionPlantNullable<T>>

Represents an AssertionPlantNullable which is intended to serve as receiver object for lambdas which create Assertions, in which this assertion plant collects the so created assertions.

In contrast to ReportingAssertionPlantNullable, this plant does not offer reporting capabilities. It merely offers a method to getAssertions (the collected ones).

Parameters

T - The type of the subject of this AssertionPlant.

Inherited Functions

getAssertions

abstract fun getAssertions(): List<Assertion>

Returns the Assertions which have been added to this plant.

Extension Functions

asExpect

fun <T, A : BaseAssertionPlant<T, *>> A.asExpect(): Expect<T>
fun <T : Any, A : BaseAssertionPlant<T, *>> A.asExpect(assertionCreator: Expect<T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.

isNotNull

fun <T : Any> AssertionPlantNullable<T?>.isNotNull(assertionCreator: Assert<T>.() -> Unit): Unit

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

isNull

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

Makes the assertion that the Assert.subject is null.

ist

fun <T : Any> AssertionPlantNullable<T?>.ist(expected: T?): Unit

Makes the assertion that the Assert.subject is expected.

istNichtNull

fun <T : Any> AssertionPlantNullable<T?>.istNichtNull(assertionCreator: Assert<T>.() -> Unit): Unit

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

istNichtNullAber

infix fun <T : BigDecimal> AssertionPlantNullable<T?>.istNichtNullAber(expected: T): Nothing

istNull

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

Makes the assertion that the Assert.subject is null.

istNullWennNullGegebenSonst

fun <T : Any> AssertionPlantNullable<T?>.istNullWennNullGegebenSonst(assertionCreatorOrNull: (Assert<T>.() -> Unit)?): Unit

Makes the assertion that the Assert.subject is either null if assertionCreatorOrNull is null or is not null and holds all assertions assertionCreatorOrNull might create.

notToBeNull

infix fun <T : Any> AssertionPlantNullable<T?>.notToBeNull(assertionCreator: Assert<T>.() -> Unit): Unit

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

notToBeNull

fun <T : Any> AssertionPlantNullable<T?>.notToBeNull(assertionCreator: Assert<T>.() -> Unit): Unit

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

notToBeNull

infix fun <T : Any> AssertionPlantNullable<T?>.notToBeNull(assertionCreator: Assert<T>.() -> Unit): Unit

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

notToBeNullBut

fun <T : BigDecimal> AssertionPlantNullable<T?>.notToBeNullBut(expected: T): Nothing

notToBeNullBut

infix fun <T : BigDecimal> AssertionPlantNullable<T?>.notToBeNullBut(expected: T): Nothing
infix fun <T : Any> AssertionPlantNullable<T>.notToBeNullBut(keyword: Keyword): Nothing

toBe

infix fun <T> AssertionPlantNullable<T>.toBe(null: Nothing?): Unit

Makes the assertion that the Assert.subject is null.

toBe

fun <T : Any> AssertionPlantNullable<T?>.toBe(expected: T?): Unit

Makes the assertion that the Assert.subject is expected.

toBe

infix fun <T : Any> AssertionPlantNullable<T?>.toBe(expected: T?): Unit

Makes the assertion that the Assert.subject is expected.

toBeNullIfNullGivenElse

fun <T : Any> AssertionPlantNullable<T?>.toBeNullIfNullGivenElse(assertionCreatorOrNull: (Assert<T>.() -> Unit)?): Unit

Makes the assertion that the Assert.subject is either null if assertionCreatorOrNull is null or is not null and holds all assertions assertionCreatorOrNull might create.

toBeNullIfNullGivenElse

infix fun <T : Any> AssertionPlantNullable<T?>.toBeNullIfNullGivenElse(assertionCreatorOrNull: (Assert<T>.() -> Unit)?): Unit

Makes the assertion that the Assert.subject is either null if assertionCreatorOrNull is null or is not null and holds all assertions assertionCreatorOrNull might create.