atrium-api-cc-en_UK / ch.tutteli.atrium.api.cc.en_UK / ch.tutteli.atrium.assertions.charsequence.contains.builders.CharSequenceContainsCheckerBuilder / values

values

fun <T : CharSequence> CharSequenceContainsCheckerBuilder<T, CharSequenceContainsNoOpSearchBehaviour>.values(expected: Any, vararg otherExpected: Any): AssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the expected object as well as the otherExpected objects shall be searched, using a non disjoint search.

By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. Also notice, that it does not search for unique matches. Meaning, if the input of the search is 'a' and expected is defined as 'a' and one otherExpected is defined as 'a' as well, then both match, even though they match the same sequence in the input of the search. Use an option such as atLeast, atMost and exactly to control the number of occurrences you expect.

Meaning you might want to use: contains.exactly(2).value('a') instead of: contains.atLeast(1).values('a', 'a')

Parameters

expected - The object which is expected to be contained within the input of the search. otherExpected - Additional objects which are expected to be contained within the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
The AssertionPlant for which the assertion was built to support a fluent API.

@JvmName("valuesIgnoringCase") fun <T : CharSequence> CharSequenceContainsCheckerBuilder<T, CharSequenceContainsIgnoringCaseSearchBehaviour>.values(expected: Any, vararg otherExpected: Any): AssertionPlant<T>

Finishes the specification of the sophisticated contains assertion where the expected object as well as the otherExpected objects shall be searched (ignoring case), using a non disjoint search.

By non disjoint is meant that 'aa' in 'aaaa' is found three times and not only two times. Also notice, that it does not search for unique matches. Meaning, if the input of the search is 'a' and expected is defined as 'a' and one otherExpected is defined as 'a' as well, then both match, even though they match the same sequence in the input of the search. Use an option such as atLeast, atMost and exactly to control the number of occurrences you expect.

Meaning you might want to use: contains.ignoringCase.exactly(2).value('a') instead of: contains.ignoringCase.atLeast(1).values('a', 'a')

Parameters

expected - The object which is expected to be contained within the input of the search. otherExpected - Additional objects which are expected to be contained within the input of the search.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
The AssertionPlant for which the assertion was built to support a fluent API.