doc / ch.tutteli.atrium.assertions.basic.contains.checkers / ContainsChecker

ContainsChecker

abstract class ContainsChecker : Contains.Checker
Deprecated: Please open an issue if you used this class; will be removed with 1.0.0

Represents the deprecated base class for Contains.Checkers which compare how many occurrences of an expected object are found in the input of the search, against how many times the check expect it to be contained.

It further checks that times is bigger than 0 (throws an IllegalArgumentException otherwise) and additionally suggest to use a different function if times equals to zero.

Constructors

<init>

ContainsChecker(times: Int, correctCall: String, wrongCall: (Int) -> String)

Represents a base class for checkers which compare how many occurrences of an expected object are found in the input of the search, against how many times the check expect it to be contained.

Properties

times

val times: Int

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

Functions

createBasicAssertion

fun createBasicAssertion(description: Translatable, check: Boolean): DescriptiveAssertion

Creates a DescriptiveAssertion based on the given description, the property times as StringBasedRawString and the given check.

Inheritors

CharSequenceContainsChecker

abstract class CharSequenceContainsChecker : ContainsChecker, CharSequenceContains.Checker

Represents the base class for CharSequenceContains.Checker.

IterableContainsChecker

abstract class IterableContainsChecker : ContainsChecker, IterableContains.Checker

Represents the base class for IterableContains.Checker.