doc / ch.tutteli.atrium.api.cc.de_CH / nullableWerte

nullableWerte

fun <E, T : Iterable<E>> CheckerOption<E, T, InAnyOrderSearchBehaviour>.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant<T> (source)

Finishes the specification of the sophisticated contains assertion where the expected nullable value as well as the other expected nullable values (if given) shall be searched within the Iterable.

Notice, that it does not search for unique matches. Meaning, if the iterable is setOf('a', 'b') and expectedOrNull is defined as 'a' and one otherExpectedOrNulls is defined as 'a' as well, then both match, even though they match the same entry. Use an option such as zumindest, hoechstens and genau to control the number of occurrences you expect.

Meaning you might want to use: enthaelt.inBeliebigerReihenfolge.genau(2).nullableWerte('a') instead of: enthaelt.inBeliebigerReihenfolge.zumindest(1).nullableWerte('a', 'a')

Parameters

expectedOrNull - The object which is expected to be contained within the Iterable.

otherExpectedOrNulls - Additional objects which are expected to be contained within Iterable.

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, T : Iterable<E>> Builder<E, T, InAnyOrderOnlySearchBehaviour>.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant<T> (source)

Finishes the specification of the sophisticated contains assertion where the expected nullable value as well as the other expected nullable values (if given) need to be contained in Iterable where it does not matter in which order but only as many entries should be returned by the Iterable as values defined.

Parameters

expectedOrNull - The nullable value which is expectedOrNull to be contained within the Iterable.

otherExpectedOrNulls - Additional nullable values which are expectedOrNull to be contained within Iterable.

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, T : Iterable<E>> Builder<E, T, InOrderOnlySearchBehaviour>.nullableWerte(expectedOrNull: E, vararg otherExpectedOrNulls: E): AssertionPlant<T> (source)

Finishes the specification of the sophisticated contains assertion where the Iterable needs to contain only the expected nullable value as well as the other expected nullable values (if given) in the specified order.

Parameters

expectedOrNull - The nullable value which is expectedOrNull to be contained within the Iterable.

otherExpectedOrNulls - Additional nullable values which are expectedOrNull to be contained within Iterable.

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.