doc / ch.tutteli.atrium.assertions.iterable.contains.builders / IterableContainsBuilder

IterableContainsBuilder

class IterableContainsBuilder<out E, out T : Iterable<E>, S : ISearchBehaviour> : ContainsBuilder<T, S>

Represents the entry point of the fluent API of sophisticated contains assertions. It contains the plant for which the IAssertion shall be build as well as the decoration behaviour which shall be applied to the plant's subject.

Parameters

T - The input type of the search which is the same as the type of the subject of the plant. S - The search behaviour which should be applied for the input of the search.

Constructors

<init>

IterableContainsBuilder(plant: IAssertionPlant<T>, decorator: S)

Represents the entry point of the fluent API of sophisticated contains assertions.

Inherited Properties

decorator

val decorator: S

The search behaviour which shall be applied to the input of the search.

plant

val plant: IAssertionPlant<T>

The IAssertionPlant for which the sophisticated contains assertions shall be built.

Extension Properties

inAnyOrder

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsNoOpSearchBehaviour>.inAnyOrder: IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>

Defines that the search behaviour "find entries in any order in the Iterable" shall be applied to this sophisticated contains in Iterable assertion.

inBeliebigerReihenfolge

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsNoOpSearchBehaviour>.inBeliebigerReihenfolge: IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>

Defines that the search behaviour "find entries in any order in the Iterable" shall be applied to this sophisticated contains in Iterable assertion.

inGegebenerReihenfolge

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsNoOpSearchBehaviour>.inGegebenerReihenfolge: IterableContainsBuilder<E, T, IterableContainsInOrderSearchBehaviour>

Defines that the search behaviour "find entries in order in the Iterable" shall be applied to this sophisticated contains in Iterable assertion.

inOrder

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsNoOpSearchBehaviour>.inOrder: IterableContainsBuilder<E, T, IterableContainsInOrderSearchBehaviour>

Defines that the search behaviour "find entries in order in the Iterable" shall be applied to this sophisticated contains in Iterable assertion.

nur

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.nur: IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>
val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderSearchBehaviour>.nur: IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>

Defines that the constraint "only the specified entries exist in the Iterable" shall be applied to this sophisticated contains Iterable assertion.

only

val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.only: IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>
val <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderSearchBehaviour>.only: IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>

Defines that the constraint "only the specified entries exist in the Iterable" shall be applied to this sophisticated contains Iterable assertion.

Extension Functions

atLeast

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.atLeast(times: Int): IterableContainsAtLeastCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs at least number of times within the Iterable.

atMost

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.atMost(times: Int): IterableContainsAtMostCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs at least once but at most number of times within the Iterable.

eintraege

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>.eintraege(assertionCreator: IAssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: IAssertionPlant<E>.() -> Unit): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the entry needs to be contained in the Iterable which holds all assertions assertionCreator might create -- equally an entry for each further otherAssertionCreators needs to be contained in the Iterable where it does not matter in which order the entries appear.

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>.eintraege(assertionCreator: IAssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: IAssertionPlant<E>.() -> Unit): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the entry needs to be contained in the Iterable which holds all assertions assertionCreator might create -- equally an entry for each further otherAssertionCreators, following the specified order, needs to be contained in the Iterable

entries

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>.entries(assertionCreator: IAssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: IAssertionPlant<E>.() -> Unit): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the entry needs to be contained in the Iterable which holds all assertions assertionCreator might create -- equally an entry for each further otherAssertionCreators needs to be contained in the Iterable where it does not matter in which order the entries appear.

fun <E : Any, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>.entries(assertionCreator: IAssertionPlant<E>.() -> Unit, vararg otherAssertionCreators: IAssertionPlant<E>.() -> Unit): IAssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the entry needs to be contained in the Iterable which holds all assertions assertionCreator might create -- equally an entry for each further otherAssertionCreators, following the specified order, needs to be contained in the Iterable

exactly

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.exactly(times: Int): IterableContainsExactlyCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs exactly number of times within the Iterable.

genau

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.genau(times: Int): IterableContainsExactlyCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs genau number of times within the Iterable.

hoechstens

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.hoechstens(times: Int): IterableContainsAtMostCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs at least once but at most number of times within the Iterable.

nichtOderHoechstens

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.nichtOderHoechstens(times: Int): IterableContainsNotOrAtMostCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs not at all or at most number of times within the Iterable.

notOrAtMost

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.notOrAtMost(times: Int): IterableContainsNotOrAtMostCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs not at all or at most number of times within the Iterable.

objects

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderOnlySearchBehaviour>.objects(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.

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInOrderOnlySearchBehaviour>.objects(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.

objekte

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.

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.

values

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

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

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

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

werte

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

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

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

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

zumindest

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.zumindest(times: Int): IterableContainsAtLeastCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs at least number of times within the Iterable.