doc / ch.tutteli.atrium.api.cc.en_UK / entry

entry

fun <E : Any, T : Iterable<E>> IterableContainsCheckerBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.entry(assertionCreator: Assert<E>.() -> Unit): AssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where an entry shall be searched which holds all assertions assertionCreator might create.

Delegates to entries(expected).

Parameters

assertionCreator - The lambda function which creates the assertions which the entry we are looking for has to hold; or in other words, the function which defines whether an entry is the one we are looking for or not.

Exceptions

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

Return
The AssertionPlant for which the assertion was built to support a fluent API.

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>.entry(assertionCreator: Assert<E>.() -> Unit): AssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the Iterable needs to contain only one entry which holds all assertions created by the given assertionCreator.

Delegates to entries(assertionCreator).

Parameters

assertionCreator - The identification lambda.

Exceptions

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

Return
The AssertionPlant for which the assertion was built to support a fluent API.

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>.entry(assertionCreator: Assert<E>.() -> Unit): AssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the Iterable needs to contain only one entry which holds all assertions created by the given assertionCreator.

Delegates to entries(assertionCreator)

Parameters

assertionCreator - The identification lambda.

Exceptions

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

Return
The AssertionPlant for which the assertion was built to support a fluent API.