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

isKeyValue

fun <K : Any, V : Any> Assert<Entry<K, V>>.isKeyValue(key: K, value: 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.9.0#migration for migration hints and scripts.

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

Kind of a shortcut for key { toBe(key) }.and.value { toBe(value) } 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.