doc / ch.tutteli.atrium.logic.creating.iterable.contains / IterableLikeContains / EntryPointStep

EntryPointStep

interface EntryPointStep<E, T, out S : IterableLikeContains.SearchBehaviour> : Contains.EntryPointStep<T, S>

The entry point of the contract.

Use _logic to retrieve the EntryPointStepLogic counterpart in case you want to extend the building process.

Extension Properties

_logic

val <E, T : Any, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>._logic: IterableLikeContains.EntryPointStepLogic<E, T, S>

Entry point to the logic level of Atrium -- which is one level deeper than the API -- within the building process of a sophisticated contains assertion for Iterable.

grouped

val <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.grouped: IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>

Defines that the IterableLike contains in order only groups of entries whereas the order within the group is specified as next step.

inAnyOrder

val <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inAnyOrder: IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>

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

inOrder

val <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inOrder: IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>

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

only

val <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>.only: IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>

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

val <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>.only: IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>

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

within

val <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>.within: IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>

A filler word to emphasis that the next step defines the order within expected groups of values.

Extension Functions

_logicAppend

fun <E, T : Any, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>._logicAppend(factory: IterableLikeContains.EntryPointStepLogic<E, T, S>.() -> Assertion): Expect<T>

Appends the Assertion the given factory creates based on this IterableLikeContains.EntryPointStep.

and

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>.and(only: only): IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>

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

atLeast

fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atLeast(times: Int): AtLeastCheckerStep<E, T, S>

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 IterableLike.

atLeast

infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atLeast(times: Int): AtLeastCheckerStep<E, T, S>

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 IterableLike.

atMost

fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atMost(times: Int): AtMostCheckerStep<E, T, S>

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 IterableLike.

atMost

infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atMost(times: Int): AtMostCheckerStep<E, T, S>

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 IterableLike.

but

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>.but(only: only): IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>

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

elementsOf

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike where it does not matter in which order.

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike in the specified order.

elementsOf

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike where it does not matter in which order.

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.elementsOf(expectedIterableLike: IterableLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only and all elements of expectedIterableLike in the specified order.

entries

fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.entries(assertionCreatorOrNull: (Expect<E>.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Expect<E>.() -> Unit)?): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only an entry for assertionCreatorOrNull as well as for the otherAssertionCreatorsOrNulls where it does not matter in which order they appear -- an entry is contained if it either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.entries(assertionCreatorOrNull: (Expect<E>.() -> Unit)?, vararg otherAssertionCreatorsOrNulls: (Expect<E>.() -> Unit)?): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only an entry for assertionCreatorOrNull as well as for the otherAssertionCreatorsOrNulls in the specified order -- an entry is contained if it either holds all assertions assertionCreatorOrNull creates or needs to be null in case assertionCreatorOrNull is defined as null.

entry

fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only one entry which holds all assertions created by the given assertionCreatorOrNull or is null in case assertionCreatorOrNull is defined as null.

entry

infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only one entry which holds all assertions created by the given assertionCreatorOrNull or is null in case assertionCreatorOrNull is defined as null.

exactly

fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.exactly(times: Int): ExactlyCheckerStep<E, T, S>

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 IterableLike.

exactly

infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.exactly(times: Int): ExactlyCheckerStep<E, T, S>

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 IterableLike.

grouped

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.grouped(entries: entries): IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>

Defines that the IterableLike contains in order only groups of entries whereas the order within the group is specified as next step.

inAny

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<E, Group<E>>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the expected Order.firstGroup as well as the Order.secondGroup and optionally Order.otherExpectedGroups of values need to be contained in IterableLike in the specified order whereas the values within the groups can occur in any order.

infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAny(order: Order<(Expect<E>.() -> Unit)?, Group<(Expect<E>.() -> Unit)?>>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the expected Order.firstGroup as well as the Order.secondGroup and optionally Order.otherExpectedGroups of identification lambdas, identifying an entry, need to be contained in IterableLike in the specified order whereas the identification lambdas within the groups can occur in any order.

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inAny(order: order): IterableLikeContains.EntryPointStep<E, T, InAnyOrderSearchBehaviour>

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

inAnyOrder

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAnyOrder(firstGroup: Group<E>, secondGroup: Group<E>, vararg otherExpectedGroups: Group<E>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the expected firstGroup as well as the secondGroup and optionally otherExpectedGroups of values need to be contained in IterableLike as only elements and in the specified order whereas the values within the groups can occur in any order.

fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlyGroupedWithinSearchBehaviour>.inAnyOrder(firstGroup: Group<(Expect<E>.() -> Unit)?>, secondGroup: Group<(Expect<E>.() -> Unit)?>, vararg otherExpectedGroups: Group<(Expect<E>.() -> Unit)?>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the expected firstGroup as well as the secondGroup and optionally otherExpectedGroups of identification lambdas, identifying an entry, need to be contained in IterableLike as only elements and in the specified order whereas the identification lambdas within the groups can occur in any order.

inGiven

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inGiven(order: order): IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>

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

notOrAtMost

fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerStep<E, T, S>

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 IterableLike.

notOrAtMost

infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.notOrAtMost(times: Int): NotOrAtMostCheckerStep<E, T, S>

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 IterableLike.

the

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected values where it does not matter in which order.

infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InAnyOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the given entries where it does not matter in which order they appear -- an entry is contained if it either holds all assertions entries.assertionCreatorOrNull creates or it needs to be null in case entries.assertionCreatorOrNull is defined as null

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.the(values: Values<E>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected values in the specified order.

infix fun <E : Any, T> IterableLikeContains.EntryPointStep<out E?, T, InOrderOnlySearchBehaviour>.the(entries: Entries<E>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the given entries in the specified order -- an entry is contained if it either holds all assertions entries.assertionCreatorOrNull creates or it needs to be null in case entries.assertionCreatorOrNull is defined as null

value

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.value(expected: E): Expect<T>
fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.value(expected: E): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected value.

value

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.value(expected: E): Expect<T>
infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.value(expected: E): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected value.

values

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InAnyOrderOnlySearchBehaviour>.values(expected: E, vararg otherExpected: E): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected value as well as the otherExpected values where it does not matter in which order.

fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlySearchBehaviour>.values(expected: E, vararg otherExpected: E): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (an IterableLike) needs to contain only the expected value as well as the otherExpected values in the specified order.

within

infix fun <E, T> IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedSearchBehaviour>.within(group: group): IterableLikeContains.EntryPointStep<E, T, InOrderOnlyGroupedWithinSearchBehaviour>

A filler word to emphasis that the next step defines the order within expected groups of values.

Inheritors

EntryPointStepInternal

interface EntryPointStepInternal<E, T, out S : IterableLikeContains.SearchBehaviour> : IterableLikeContains.EntryPointStep<E, T, S>, IterableLikeContains.EntryPointStepLogic<E, T, S>

Sole purpose of this interface is to hide EntryPointStepLogic from newcomers which usually do not have to deal with this type and to keep the API clean.