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

Return

an Expect for the subject of this expectation.

Samples

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")
}