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

isKeyValue

infix fun <K, V, T : Entry<K, V>> Expect<T>.isKeyValue(keyValuePair: Pair<K, V>): Expect<T>

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

Kind of a shortcut for and { key { this toBe key }; value { this toBe value } } where and denotes an assertion group block. Yet, the actual behaviour depends on implementation - could also be fail fast for instance or augment reporting etc.

Exceptions

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

Return
An Expect for the current subject of the assertion.