doc / ch.tutteli.atrium.api.cc.de_CH / genau

genau

fun <T : CharSequence, S : ISearchBehaviour> CharSequenceContainsBuilder<T, S>.genau(times: Int): CharSequenceContainsExactlyCheckerBuilder<T, S>

Restricts a contains assertion by specifying that the number of occurrences of the object which we are looking for, occurs exactly number of times within the search input.

Parameters

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

Exceptions

IllegalArgumentException - In case times is smaller than zero. IllegalArgumentException - In case times equals to zero; use enhaeltNicht instead.

Return
The newly created builder.

fun <E, T : Iterable<E>> IterableContainsBuilder<E, T, IterableContainsInAnyOrderSearchBehaviour>.genau(times: Int): IterableContainsExactlyCheckerBuilder<E, T>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for, occurs genau number of times within the Iterable.

Parameters

times - The number which the check will compare against the actual number of times an expected entry is found in the Iterable.

Exceptions

IllegalArgumentException - In case times is smaller than zero. IllegalArgumentException - In case times equals to zero; use enthaeltNicht instead.

Return
The newly created builder.