doc / ch.tutteli.atrium.logic.creating.basic.contains.checkers

Package ch.tutteli.atrium.logic.creating.basic.contains.checkers

Contains interfaces implementing Contains.Checker

Types

AtLeastChecker

interface AtLeastChecker : WithTimesChecker

Represents a check that an expected search criterion is contained at least times in the search input.

AtMostChecker

interface AtMostChecker : WithTimesChecker

Represents a check that an expected search criterion is contained at most times in the search input.

ExactlyChecker

interface ExactlyChecker : WithTimesChecker

Represents a check that an expected search criterion is contained exactly times in the search input.

NotChecker

interface NotChecker : CharSequenceContains.Checker

Represents a check that an expected search criterion is not contained in the search input.

WithTimesChecker

interface WithTimesChecker : Contains.Checker

Represents a checker which is based on the number of times a search criterion is found within the search input.

Functions

validateAtMost

fun validateAtMost(times: Int, atMostCall: (Int) -> String, atLeastCall: (Int) -> String, exactlyCall: (Int) -> String): Unit

Validates that times is not 1; throws an IllegalArgumentException otherwise, pointing the user to use the given exactlyCall instead of the given atMostCall.

validateButAtMost

fun validateButAtMost(atLeastTimes: Int, butAtMostTimes: Int, atLeastButAtMostCall: (Int, Int) -> String, atLeastCall: (Int) -> String, butAtMostCall: (Int) -> String, exactlyCall: (Int) -> String): Unit

Validates that atLeastTimes is not equal to or greater than butAtMostTimes; throws an IllegalArgumentException otherwise, pointing the user to use the given exactlyCall in case atLeastTimes equals butAtMostTimes.