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

EntryPointStepLogic

interface EntryPointStepLogic<K, V, T, out S : MapLikeContains.SearchBehaviour> : Contains.EntryPointStepLogic<T, S>

The entry point of the contract on the logic level, containing the container -- i.e. the subject of the assertion for which the sophisticated contain assertion should be created -- as well as the chosen searchBehaviour.

The searchBehaviour might me modified in which case it is recommended that a new EntryPointStep is created (retain immutability).

Properties

converter

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

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

Inherited Properties

container

abstract val container: AssertionContainer<T>

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

searchBehaviour

abstract val searchBehaviour: S

The chosen SearchBehaviour.

Functions

withSearchBehaviour

open fun <S2 : MapLikeContains.SearchBehaviour> withSearchBehaviour(searchBehaviour: S2): MapLikeContains.EntryPointStep<K, V, T, S2>

Extension Properties

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>

inAnyOrder

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

inOrder

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

Extension Functions

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

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.