doc / ch.tutteli.atrium.logic.creating.charsequence.contains.steps.impl / NotOrAtMostCheckerStepImpl

NotOrAtMostCheckerStepImpl

class NotOrAtMostCheckerStepImpl<T : CharSequence, out S : CharSequenceContains.SearchBehaviour> : NotOrAtMostCheckerStep<T, S>, CharSequenceContains.CheckerStepInternal<T, S> (source)

Constructors

<init>

NotOrAtMostCheckerStepImpl(times: Int, nameContainsNotFun: String, notOrAtMostCall: (Int) -> String, entryPointStepLogic: CharSequenceContains.EntryPointStepLogic<T, S>)

Properties

checkers

val checkers: List<AtMostChecker>

Contains all Checkers which should be applied to the search result.

entryPointStepLogic

val entryPointStepLogic: CharSequenceContains.EntryPointStepLogic<T, S>

The previously chosen EntryPointStep, containing inter alia the AssertionContainer to which the resulting Assertion shall be appended.

Extension Properties

_logic

val <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.CheckerStep<T, S>._logic: CharSequenceContains.CheckerStepLogic<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 CharSequence.

Extension Functions

_logicAppend

fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.CheckerStep<T, S>._logicAppend(factory: CharSequenceContains.CheckerStepLogic<T, S>.() -> Assertion): Expect<T>

Appends the Assertion the given factory creates based on this CharSequenceContains.CheckerStep.

matchFor

infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.matchFor(pattern: Regex): Expect<T>

Finishes the specification of the sophisticated contains assertion where the given Regex is expected to have a match.

infix fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.matchFor(patterns: All<Regex>): Expect<T>

Finishes the specification of the sophisticated contains assertion where the given Regex are expected to have a match, using a non disjoint search.

regex

fun <T : CharSequence> CharSequenceContains.CheckerStep<T, NoOpSearchBehaviour>.regex(pattern: Regex, vararg otherPatterns: Regex): Expect<T>

Finishes the specification of the sophisticated contains assertion where the given Regex as well as the otherPatterns are expected to have a match, using a non disjoint search.

regex

fun <T : CharSequence> CharSequenceContains.CheckerStepLogic<T, NoOpSearchBehaviour>.regex(expected: List<String>): AssertionGroup

toVarArg

fun <T> CharSequenceContains.CheckerStepLogic<*, *>.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.