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 : ISearchBehaviour>

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 : ISearchBehaviour, out C : IChecker, 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, nameAtMostFun: String, nameAtLeastFun: String, nameExactlyFun: String): Unit

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

validateButAtMost

fun validateButAtMost(atLeastTimes: Int, butAtMostTimes: Int, nameAtLeastFun: String, nameButAtMostFun: String, nameExactlyFun: String): Unit

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