doc / ch.tutteli.atrium.api.cc.infix.en_GB.creating.map.get.builders / MapGetOption

MapGetOption

interface MapGetOption<K, V : Any, T : Map<out K, V>> (source)

Represents the extension point for another option after a get key-step within a sophisticated get assertion building process for Map.

Parameters

K - The key type of the Map.

V - the value type of the Map.

T - A subtype of Map.

Properties

key

abstract val key: K

The given key which will be used to perform the Map.get.

plant

abstract val plant: Assert<T>

The AssertionPlant for which this assertion is created

Functions

assertIt

abstract infix fun assertIt(assertionCreator: Assert<V>.() -> Unit): Assert<T>

Makes the assertion that the Assert.subject contains the previously specified key and that the corresponding value holds all assertions the given assertionCreator might create for it.

Companion Object Functions

create

fun <K, V : Any, T : Map<out K, V>> create(plant: Assert<T>, key: K): MapGetOption<K, V, T>

Creates a MapGetOption based on the given plant and key.