doc / ch.tutteli.atrium.logic.creating.maplike.contains.steps.impl / EntryPointStepImpl

EntryPointStepImpl

class EntryPointStepImpl<K, V, T, out S : MapLikeContains.SearchBehaviour> : EntryPointStepImpl<T, S>, MapLikeContains.EntryPointStepInternal<K, V, T, S> (source)

Constructors

<init>

EntryPointStepImpl(container: AssertionContainer<T>, converter: (T) -> Map<out K, V>, searchBehaviour: S)

Properties

converter

val converter: (T) -> Map<out K, V>

The converter which shall be used to turn the subject of this expectation into an Iterable of type E.

Inherited Properties

container

open val container: AssertionContainer<T>

The AssertionContainer from which this building process started and to which the resulting Assertion should be appended.

searchBehaviour

open val searchBehaviour: S

The chosen SearchBehaviour.

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.

andOnly

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

butOnly

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

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.

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.

toVarArgPairs

fun <K, V> MapLikeContains.EntryPointStepLogic<*, *, *, *>.toVarArgPairs(mapLike: MapLike): Pair<Pair<K, V>, Array<out Pair<K, V>>>

Transforms the given MapLike to Pair<Pair<K, V>, Array<out Pair<K, V>>> with the intention that it can be easily used for a function requiring Pair<K, V>, vararg Pair<K, V>.