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

objekte

fun <E, T : Iterable<E>> IterableContainsCheckerBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.objekte(expected: E, vararg otherExpected: E): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the expected object as well as the otherExpected objects shall be searched within the iterable.

Delegates to objekte.

Notice, that it does not search for unique matches. Meaning, if the iterable is setOf('a', 'b') and expected is defined as 'a' and one otherExpected 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).objekte('a') instead of: enthaelt.inBeliebigerReihenfolge.zumindest(1).objekte('a', 'a')

Parameters

expected - The object which is expected to be contained within the Iterable. otherExpected - 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 IAssertionPlant for which the assertion was built to support a fluent API.

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>.objekte(expected: E, vararg otherExpected: E): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the expected object as well as the otherExpected objects need to be contained in Iterable where it does not matter in which order.

Parameters

expected - The value which is expected to be contained within the Iterable. otherExpected - Additional values which are expected to be contained within Iterable.

Exceptions

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

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

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>.objekte(expected: E, vararg otherExpected: E): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the expected object as well as the otherExpected objects need to be contained in Iterable in the specified order.

Parameters

expected - The value which is expected to be contained within the Iterable. otherExpected - Additional values which are expected to be contained within Iterable.

Exceptions

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

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