doc / ch.tutteli.atrium.logic.creating.charsequence.contains.steps / WithTimesCheckerStepInternal

WithTimesCheckerStepInternal

interface WithTimesCheckerStepInternal<T : CharSequence, out S : CharSequenceContains.SearchBehaviour> : WithTimesCheckerStep<T, S>, WithTimesCheckerStepLogic<T, S>, CharSequenceContains.CheckerStepInternal<T, S> (source)

Sole purpose of this interface is to hide CharSequenceContains.CheckerStepLogic from newcomers which usually don't have to deal with this type and to keep the API clean.

Moreover, this keeps the API clean and does not pollute it with things like times, containsBuilder etc.

See https://github.com/robstoll/atrium-roadmap/wiki/Requirements#personas for more information about the personas.

Inherited Properties

times

abstract val times: Int

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.

butAtMostCheckerStep

fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> WithTimesCheckerStepLogic<T, S>.butAtMostCheckerStep(times: Int, nameContainsNotFun: String, atLeastButAtMostCall: (Int, Int) -> String, atLeastCall: (Int) -> String, butAtMostCall: (Int) -> String, exactlyCall: (Int) -> String, atMostCall: (Int) -> String): ButAtMostCheckerStep<T, S>

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.

Inheritors

GenericTimesCheckerStep

class GenericTimesCheckerStep<T : CharSequence, out S : CharSequenceContains.SearchBehaviour> : WithTimesCheckerStepInternal<T, S>, AtLeastCheckerStep<T, S>, ButAtMostCheckerStep<T, S>, ExactlyCheckerStep<T, S>