doc / ch.tutteli.atrium.api.cc.infix.en_GB.creating.list.get.builders / ListGetNullableOption / assertIt

assertIt

abstract infix fun assertIt(assertionCreator: AssertionPlantNullable<E>.() -> Unit): Assert<T> (source)

Makes the assertion that the given index is within the bounds of Assert.subject and that the corresponding nullable entry holds all assertions the given assertionCreator might create for it.

Notice, that the corresponding entry of the given index can be null even if the index is within bounds as the List has a nullable element type.

Exceptions

AssertionError - Might throw an AssertionError if a created Assertions (by calling assertionCreator) does not hold.

IllegalArgumentException - in case the given assertionCreator did not create a single assertion.

Return
This plant to support a fluent API.