doc / ch.tutteli.atrium.api.fluent.en_GB / toContainEntriesOf

toContainEntriesOf

fun <K, V : Any, T : Map<out K, V?>> Expect<T>.toContainEntriesOf(mapLike: MapLike): Expect<T> (source)

Expects that the subject of this expectation (a Map) contains the key-value pairs of the given mapLike.

Delegates to toContain.inAnyOrder.entriesOf

expect(mapOf(1 to "a")).toContainEntriesOf(mapOf(1 to "a"))

fails { // because the map does not contain entry with key 1 and value "b"
    expect(mapOf(1 to "a")).toContainEntriesOf(mapOf(1 to "b"))
}

Return
an Expect for the subject of this expectation.

Since
0.17.0