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

getExisting

infix fun <K, V : Any, T : Map<out K, V>> Assert<T>.getExisting(key: K): Assert<V>

Makes the assertion that the Assert.subject contains the given key, creates a feature assertion plant for the corresponding value and returns the newly created plant.

Exceptions

AssertionError - Might throw an AssertionError if the given key does not exist.

Return
The newly created plant for the feature

infix fun <K, V : Any, T : Map<out K, V>> Assert<T>.getExisting(key: Key<K>): MapGetOption<K, V, T>

Prepares the assertion about the return value of calling get with the given key.

Return
A fluent builder to finish the assertion.