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

werte

fun <T : CharSequence> CharSequenceContains.CheckerOption<T, NoOpSearchBehaviour>.werte(expected: Any, vararg otherExpected: Any): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

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

Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed (this function expects Any for your convenience, so that you can mix String and Int for instance).

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.

Parameters

expected - The value which is expected to be contained within the input of the search.

otherExpected - Additional values 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.

IllegalArgumentException - in case expected or one of the otherExpected is not a CharSequence, Number or Char.

Return
An Expect for the current subject of the assertion.

@JvmName("werteGrossKleinschreibungIgnorierend") fun <T : CharSequence> CharSequenceContains.CheckerOption<T, IgnoringCaseSearchBehaviour>.werte(expected: Any, vararg otherExpected: Any): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

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

Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed (this function expects Any for your convenience, so that you can mix String and Int for instance).

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.

Parameters

expected - The value which is expected to be contained within the input of the search.

otherExpected - Additional values 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.

IllegalArgumentException - in case expected or one of the otherExpected is not a CharSequence, Number or Char.

Return
An Expect for the current subject of the assertion.

fun <T : CharSequence> CharSequenceContains.Builder<T, IgnoringCaseSearchBehaviour>.werte(expected: Any, vararg otherExpected: Any): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Finishes the specification of the sophisticated contains assertion where the expected value as well as the otherExpected values shall be searched (ignoring case), using a non disjoint search where each need to be contained at least once.

Delegates to zumindest(1).werte(expected, otherExpected)

Notice that a runtime check applies which assures that only CharSequence, Number and Char are passed (this function expects Any for your convenience, so that you can mix String and Int for instance).

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.

Parameters

expected - The value which is expected to be contained within the input of the search.

otherExpected - Additional values 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.

IllegalArgumentException - in case expected or one of the otherExpected is not a CharSequence, Number or Char.

Return
An Expect for the current subject of the assertion.

fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.werte(expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Finishes the specification of the sophisticated contains assertion where the expected value as well as the otherExpected values (if given) shall be searched within the Iterable.

Notice, that it does not search for unique matches. Meaning, if the iterable is setOf('a', 'b') and expected is defined as 'a' and one otherExpected is defined as 'a' as well, then both match, even though they match the same entry. Use an option such as zumindest, hoechstens and genau to control the number of occurrences you expect.

Meaning you might want to use: enthaelt.inBeliebigerReihenfolge.genau(2).werte('a') instead of: enthaelt.inBeliebigerReihenfolge.zumindest(1).werte('a', 'a')

Parameters

expected - The object which is expected to be contained within the Iterable.

otherExpected - Additional objects which are expected to be contained within Iterable.

Exceptions

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

Return
An Expect for the current subject of the assertion.

fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InAnyOrderOnlySearchBehaviour>.werte(expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Finishes the specification of the sophisticated contains assertion where the expected value as well as the otherExpected values (if given) need to be contained in Iterable where it does not matter in which order but only as many entries should be returned by the Iterable as values defined.

Parameters

expected - The value which is expected to be contained within the Iterable.

otherExpected - Additional values which are expected to be contained within Iterable.

Exceptions

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

Return
An Expect for the current subject of the assertion.

fun <E, T : Iterable<E>> IterableContains.Builder<E, T, InOrderOnlySearchBehaviour>.werte(expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: api-cc-de_CH is discontinued, switch to api-fluent-en_GB; will be removed with 1.0.0

Finishes the specification of the sophisticated contains assertion where the Iterable needs to contain only the expected value as well as the otherExpected values (if given) in the specified order.

Parameters

expected - The value which is expected to be contained within the Iterable.

otherExpected - Additional values which are expected to be contained within Iterable.

Exceptions

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

Return
An Expect for the current subject of the assertion.

fun <E, T : Iterable<E>> werte(checkerBuilder: IterableContainsCheckerBuilder<E, T, InAnyOrderSearchBehaviour>, expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0


fun <E, T : Iterable<E>> werte(checkerBuilder: IterableContainsBuilder<E, T, InAnyOrderOnlySearchBehaviour>, expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0


fun <E, T : Iterable<E>> werte(checkerBuilder: IterableContainsBuilder<E, T, InOrderOnlySearchBehaviour>, expected: E, vararg otherExpected: E): AssertionPlant<T>
Deprecated: Use the extension fun `werte` instead. This fun is only here to retain binary compatibility; will be removed with 1.0.0