doc / ch.tutteli.atrium.api.cc.en_GB / exactly

exactly

fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.exactly(times: Int): ExactlyCheckerOption<T, S>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Restricts a contains assertion by specifying that the number of occurrences of the value 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 value 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 containsNot instead.

Return
The newly created builder.

fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.exactly(times: Int): ExactlyCheckerOption<E, T, S>
Deprecated: Switch from api-cc-en_GB to api-fluent-en_GB; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.9.0#migration for migration hints and scripts.

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs exactly 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 containsNot instead.

Return
The newly created builder.