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

toEqualKeyValue

fun <K, V, T : Entry<K, V>> Expect<T>.toEqualKeyValue(key: K, value: V): Expect<T> (source)

Expects that the property Map.Entry.key of the subject of this expectation is equal to the given key and the property Map.Entry.value is equal to the given value.

expect(mapOf(1 to "a").entries.first()).toEqualKeyValue(1, "a")

fails {
    expect(mapOf(1 to "a").entries.first()).toEqualKeyValue(1, "b")
}

Return
an Expect for the subject of this expectation.

Since
0.17.0