doc / ch.tutteli.atrium.api.infix.en_GB / atLeast

atLeast

infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.EntryPointStep<T, S>.atLeast(times: Int): AtLeastCheckerStep<T, S>
infix fun <T : CharSequence, S : CharSequenceContains.SearchBehaviour> CharSequenceContains.Builder<T, S>.atLeast(times: Int): AtLeastCheckerOption<T, S>

Restricts a contains assertion by specifying that the number of occurrences of the value which we are looking for occurs at least 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.

infix fun <E, T : Iterable<E>, S : InAnyOrderSearchBehaviour> IterableContains.Builder<E, T, S>.atLeast(times: Int): AtLeastCheckerOption<E, T, S>

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

infix fun <E, T, S : InAnyOrderSearchBehaviour> IterableLikeContains.EntryPointStep<E, T, S>.atLeast(times: Int): AtLeastCheckerStep<E, T, S>

Restricts a contains assertion by specifying that the number of occurrences of the entry which we are looking for occurs at least number of times within the IterableLike.

Parameters

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

Exceptions

IllegalArgumentException - In case times is smaller than zero.

IllegalArgumentException - In case times equals to zero; use containsNot instead.

Return
The newly created builder.

Since
0.14.0 -- API existed for Iterable but not for IterableLike.