doc / ch.tutteli.atrium.api.cc.infix.en_GB / isKeyValue

isKeyValue

infix fun <K : Any, V : Any> Assert<Entry<K, V>>.isKeyValue(keyValuePair: Pair<K, V>): Assert<Entry<K, V>>
Deprecated: Switch from Assert to Expect; will be removed with 1.0.0 -- see https://github.com/robstoll/atrium/releases/tag/v0.12.0#migration for migration hints and scripts.

Makes the assertion that the Assert.subject's Map.Entry.key is (equal to) the given Pair.first and Map.Entry.value is Pair.second.

Kind of a shortcut for key.toBe(keyValuePair.first); value.toBe(keyValuePair.second) but should be evaluated in an assertion group block -- which has the effect that the assertion about the value is still evaluated even if the assertion about the key fails. Moreover, it might be that reporting differs compared to using the long form.

Exceptions

AssertionError - Might throw an AssertionError if the assertion made is not correct.

Return
This plant to support a fluent API.