fun <E, T : Iterable<E>> IterableContains.CheckerOption<E, T, InAnyOrderSearchBehaviour>.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant<T>
Finishes the specification of the sophisticated contains
assertion where the expected value as well as the
otherExpected values 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 atLeast, atMost and exactly to control the number of occurrences you expect.
Meaning you might want to use:
contains.inAnyOrder.exactly(2).values('a')
instead of:
contains.inAnyOrder.atLeast(1).values('a', 'a')
expected
- The object which is expected to be contained within the Iterable.
otherExpected
- Additional objects which are expected to be contained within Iterable.
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>.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant<T>
Finishes the specification of the sophisticated contains
assertion where the expected value as well as the
otherExpected values need to be contained in Iterable where it does not matter in which order.
expected
- The value which is expected to be contained within the Iterable.
otherExpected
- Additional values which are expected to be contained within Iterable.
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>.nullableValues(expected: E, vararg otherExpected: E): AssertionPlant<T>
Finishes the specification of the sophisticated contains
assertion where the expected value as well as the
otherExpected values need to be contained in Iterable in the specified order.
expected
- The value which is expected to be contained within the Iterable.
otherExpected
- Additional values which are expected to be contained within Iterable.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
An Expect for the current subject of the assertion.