atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating.charsequence.contains.builders / ButAtMostCheckerOptionBase

ButAtMostCheckerOptionBase

abstract class ButAtMostCheckerOptionBase<out T : CharSequence, out S : SearchBehaviour> : WithTimesCheckerOption<T, S>

The base class for builders which create the second step of a contains at least but at most check within the fluent API of a sophisticated contains assertion for CharSequence.

Parameters

T - The input type of the search.

S - The search behaviour which should be applied to the input of the search.

Constructors

<init>

ButAtMostCheckerOptionBase(times: Int, atLeastBuilder: WithTimesCheckerOption<T, S>, containsBuilder: Builder<T, S>, nameContainsNotFun: String, atLeastButAtMostCall: (Int, Int) -> String, atMostCall: (Int) -> String, atLeastCall: (Int) -> String, butAtMostCall: (Int) -> String, exactlyCall: (Int) -> String)

The base class for builders which create the second step of a contains at least but at most check within the fluent API of a sophisticated contains assertion for CharSequence.

Properties

checkers

open val checkers: List<Checker>

containsBuilder

val containsBuilder: Builder<T, S>

The previously used CharSequenceContains.Builder.

times

val times: Int

The number which the check will compare against the actual number of times an expected object is found in the input of the search.

Extension Functions

addAssertion

fun <T : Any, B : Builder<T, *>> CheckerOption<T, *, *, B>.addAssertion(assertion: Assertion): Expect<T>

Helper method which simplifies adding assertions to the assertion container which itself is stored in Contains.CheckerOption.containsBuilder.

addAssertionForAssert

fun <T : Any, B : Builder<T, *>> CheckerOption<T, *, *, B>.addAssertionForAssert(assertion: Assertion): Assert<T>

Helper method which simplifies adding assertions to the assertion container which itself is stored in Contains.CheckerOption.containsBuilder.