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

toContainEntriesOf

infix 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 it toContain o inAny order 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.