inGiven
infix fun <E, T : IterableLike> IterableLikeContains.EntryPointStep<E, T, NoOpSearchBehaviour>.inGiven(order: order): IterableLikeContains.EntryPointStep<E, T, InOrderSearchBehaviour>(source)
Defines that the search behaviour "find entries in order in the IterableLike" shall be applied to this sophisticated to contain in IterableLike expectation.
Return
The newly created builder.
Since
0.14.0 -- API existed for Iterable but not for IterableLike.
infix fun <K, V, T : MapLike> MapLikeContains.EntryPointStep<K, V, T, NoOpSearchBehaviour>.inGiven(order: order): MapLikeContains.EntryPointStep<K, V, T, InOrderSearchBehaviour>(source)
Defines that the search behaviour "find entries in order in the MapLike" shall be applied to this sophisticated to contain in MapLike expectation.
Return
The newly created builder.
Since
0.15.0
Samples
expect(mapOf(1 to "a")) toContain o inGiven order and only entry (1 to "a")
fails { // because the entry 1="a" (which exists in the subject) is not the only entry
expect(mapOf(1 to "a", 2 to "b")) toContain o inGiven order and only entry (1 to "a")
}