doc / ch.tutteli.atrium.assertions.basic.contains.builders

Package ch.tutteli.atrium.assertions.basic.contains.builders

Contains base classes for builders representing a step in the process of creating sophisticated contains assertions.

Types

ContainsBuilder

abstract class ContainsBuilder<out T : Any, S : SearchBehaviour>

Represents the base class for builders representing the entry point of the process of building a sophisticated contains assertion.

ContainsCheckerBuilder

abstract class ContainsCheckerBuilder<out T : Any, S : SearchBehaviour, out C : Checker, out B : ContainsBuilder<T, S>>

Represents the base class for builders representing a checking step in the process of building a sophisticated contains assertion.

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 IllegalArgumentException otherwise, pointing the user to use the given exactlyCall in case atLeastTimes equals butAtMostTimes.