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

EntryPointStepLogic

interface EntryPointStepLogic<E, T, out S : IterableLikeContains.SearchBehaviour> : Contains.EntryPointStepLogic<T, S> (source)

The entry point of the contract on the logic level, containing the container -- i.e. the subject of this expectation 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) -> Iterable<E>

The converter which shall be used to turn the subject of this expectation 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 : IterableLikeContains.SearchBehaviour> withSearchBehaviour(searchBehaviour: S2): IterableLikeContains.EntryPointStep<E, T, S2>

Extension Properties

andOnly

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

butOnly

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

grouped

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

inAnyOrder

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

inOrder

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

within

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

Extension Functions

atLeastCheckerStep

fun <E, T, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStepLogic<E, T, S>.atLeastCheckerStep(times: Int, nameContainsNotFun: String, atLeastCall: (Int) -> String): AtLeastCheckerStep<E, T, S>

atMostCheckerStep

fun <E, T, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStepLogic<E, T, S>.atMostCheckerStep(times: Int, nameContainsNotFun: String, atMostCall: (Int) -> String, atLeastCall: (Int) -> String, exactlyCall: (Int) -> String): AtMostCheckerStep<E, T, S>

exactlyCheckerStep

fun <E, T, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStepLogic<E, T, S>.exactlyCheckerStep(times: Int, nameContainsNotFun: String, exactlyCall: (Int) -> String): ExactlyCheckerStep<E, T, S>

notCheckerStep

fun <E, T, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStepLogic<E, T, S>.notCheckerStep(): NotCheckerStep<E, T, S>

notOrAtMostCheckerStep

fun <E, T, S : IterableLikeContains.SearchBehaviour> IterableLikeContains.EntryPointStepLogic<E, T, S>.notOrAtMostCheckerStep(times: Int, nameContainsNotFun: String, notOrAtMostCall: (Int) -> String): NotOrAtMostCheckerStep<E, T, S>

toVarArg

fun <T> IterableLikeContains.EntryPointStepLogic<*, *, *>.toVarArg(iterableLike: IterableLike): Pair<T, Array<out T>>

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

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.