doc / ch.tutteli.atrium.logic.creating.maplike.contains / MapLikeContains / EntryPointStep

EntryPointStep

interface EntryPointStep<K, V, T, out S : MapLikeContains.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 <K, V, T : Any, S : MapLikeContains.SearchBehaviour> MapLikeContains.EntryPointStep<K, V, T, S>._logic: MapLikeContains.EntryPointStepLogic<K, V, 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.

inAnyOrder

val <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inAnyOrder: MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>

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

inOrder

val <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inOrder: MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>

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

only

val <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.only: MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>

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

val <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>.only: MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>

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

Extension Functions

_logicAppend

fun <K, V, T : Any, S : MapLikeContains.SearchBehaviour> MapLikeContains.EntryPointStep<K, V, T, S>._logicAppend(factory: MapLikeContains.EntryPointStepLogic<K, V, T, S>.() -> Assertion): Expect<T>

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

and

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>.and(only: only): MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>

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

but

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.but(only: only): MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>

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

entries

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given keyValuePair as well as the otherPairs where it does not matter in which order they appear.

fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given keyValue as well as the otherKeyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValuePair as well as the otherPairs where it does not matter in which order they appear.

fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValue as well as the otherKeyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entries(keyValuePair: Pair<K, V>, vararg otherPairs: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValuePair as well as the otherPairs in the specified order.

fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.entries(keyValue: KeyValue<K, V>, vararg otherKeyValues: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValue as well as the otherKeyValues in the specified order -- an entry is contained if it has a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

entriesOf

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain all entries of the given expectedMapLike where it does not matter in which order they appear.

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike where it does not matter in which order they appear.

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike in the specified order.

entriesOf

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain all entries of the given expectedMapLike where it does not matter in which order they appear.

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike where it does not matter in which order they appear.

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entriesOf(expectedMapLike: MapLike): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only and all entries of the given expectedMapLike in the specified order.

entry

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given keyValuePair.

fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.entry(keyValue: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain an entry with a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>
fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain exactly one entry where key and value have to equal the given keyValuePair.

fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.entry(keyValue: KeyValue<K, V>): Expect<T>
fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.entry(keyValue: KeyValue<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain exactly one entry with a key as defined by keyValue's KeyValue.key and a corresponding value which either holds all assertions keyValue's KeyValue.valueAssertionCreatorOrNull creates or needs to be null in case KeyValue.valueAssertionCreatorOrNull is defined as null.

entry

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given keyValuePair.

infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain an entry with a key as defined by keyValue's KeyWithValueCreator.key and a corresponding value which either holds all assertions keyValue's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null.

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>
infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.entry(keyValuePair: Pair<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain exactly one entry where key and value have to equal the given keyValuePair.

infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T>
infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.entry(keyValue: KeyWithValueCreator<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain exactly one entry with a key as defined by keyValue's KeyWithValueCreator.key and a corresponding value which either holds all assertions keyValue's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null.

inAny

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inAny(order: order): MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>

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

inGiven

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inGiven(order: order): MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>

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

the

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderSearchBehaviour>.the(pairs: Pairs<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given key-value pairs where it does not matter in which order they appear.

infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderSearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain the given keyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyWithValueCreator.key and a corresponding value which either holds all assertions keyValue's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null.

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InAnyOrderOnlySearchBehaviour>.the(keyValuePairs: Pairs<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValuePairs where it does not matter in which order they appear.

infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InAnyOrderOnlySearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValues where it does not matter in which order they appear -- an entry is contained if it has a key as defined by keyValue's KeyWithValueCreator.key and a corresponding value which either holds all assertions keyValue's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null.

infix fun <K, V, T> MapLikeContains.EntryPointStep<K, V, T, InOrderOnlySearchBehaviour>.the(keyValuePairs: Pairs<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValuePairs in the specified order.

infix fun <K, V : Any, T> MapLikeContains.EntryPointStep<K, out V?, T, InOrderOnlySearchBehaviour>.the(keyValues: KeyValues<K, V>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the subject (a MapLike) needs to contain only the given keyValues in the specified order -- an entry is contained if it has a key as defined by keyValue's KeyWithValueCreator.key and a corresponding value which either holds all assertions keyValue's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null.

Inheritors

EntryPointStepInternal

interface EntryPointStepInternal<K, V, T, out S : MapLikeContains.SearchBehaviour> : MapLikeContains.EntryPointStep<K, V, T, S>, MapLikeContains.EntryPointStepLogic<K, V, 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.