infix fun <E, T : Iterable<E>> Assert<T>.containsExactly(expected: E): AssertionPlant<T>
(source)
Makes the assertion that the Assert.subject contains only the expected value.
It is a shortcut for to contain inGiven order and only value expected
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
This plant to support a fluent API.
infix fun <E, T : Iterable<E>> Assert<T>.containsExactly(values: Values<E>): AssertionPlant<T>
(source)
Makes the assertion that the Assert.subject contains only the expected values in the defined order.
It is a shortcut for to contain inGiven order and only the Values(...)
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
This plant to support a fluent API.
infix fun <E : Any, T : Iterable<E?>> Assert<T>.containsExactly(assertionCreatorOrNull: Assert<E>.() -> Unit): AssertionPlant<T>
(source)
Makes the assertion that the Assert.subject contains only one entry
which is holding the assertions created by assertionCreatorOrNull or
only one entry which is null
in case assertionCreatorOrNull is defined as null
.
It is a shortcut for to contain inGiven order and only entry assertionCreatorOrNull
assertionCreatorOrNull
- The identification lambda which creates the assertions which the entry we are looking
for has to hold; or in other words, the function which defines whether an entry is the one we are looking for
or not. In case it is defined as null
, then an entry is identified if it is null
as well.
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
This plant to support a fluent API.
infix fun <E : Any, T : Iterable<E?>> Assert<T>.containsExactly(entries: Entries<E>): AssertionPlant<T>
(source)
Makes the assertion that the Assert.subject contains only an entry holding
the assertions created by entries.assertionCreatorOrNull or
null
in case entries.assertionCreatorOrNull is defined as null
and likewise an additional entry for each
entries.otherAssertionCreatorsOrNulls (if given)
whereas the entries have to appear in the defined order.
It is a shortcut for to contain inGiven order and only the Entries(...)
AssertionError
- Might throw an AssertionError if the assertion made is not correct.
Return
This plant to support a fluent API.