fun <E : Any, T : Iterable<E?>> IterableContains.CheckerOption<E?, T, InAnyOrderSearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
(source)
Finishes the specification of the sophisticated contains
assertion where an entry shall be searched which either
holds all assertions assertionCreatorOrNull creates or needs to be null
in case assertionCreatorOrNull
is defined as null
.
Delegates to entries.
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
An Expect for the current subject of the assertion.
fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InAnyOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
(source)
Finishes the specification of the sophisticated contains
assertion where the Iterable needs to contain only one
entry which holds all assertions created by the given assertionCreatorOrNull or is null
in case
assertionCreatorOrNull is defined as null
.
Delegates to entries.
Note that we might change the signature of this function with the next version which will cause a binary backward compatibility break (see #292 for more information)
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
An Expect for the current subject of the assertion.
fun <E : Any, T : Iterable<E?>> IterableContains.Builder<E?, T, InOrderOnlySearchBehaviour>.entry(assertionCreatorOrNull: (Expect<E>.() -> Unit)?): Expect<T>
(source)
Finishes the specification of the sophisticated contains
assertion where the Iterable needs to contain only a
single entry which holds all assertions created by the given assertionCreatorOrNull or needs to be null
in case assertionCreatorOrNull is defined as null
.
Delegates to entries(assertionCreatorOrNull)
.
Note that we might change the signature of this function with the next version which will cause a binary backward compatibility break (see #292 for more information)
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
An Expect for the current subject of the assertion.