atrium-domain-builders-jvm / ch.tutteli.atrium.domain.builders.creating / MapAssertionsBuilder

MapAssertionsBuilder

object MapAssertionsBuilder (source)

Delegates inter alia to the implementation of MapAssertions. In detail, it implements MapAssertions by delegating to mapAssertions which in turn delegates to the implementation via loadSingleService.

Properties

entry

val entry: MapEntryAssertionsBuilder

Returns MapEntryAssertionsBuilder which inter alia delegates to the implementation of MapEntryAssertions.

Functions

contains

fun <K, V, T : Map<out K, V>> contains(expect: <ERROR CLASS><T>, keyValuePairs: List<Pair<K, V>>): <ERROR CLASS>
fun <K, V> contains(plant: <ERROR CLASS><Map<out K, V>>, keyValuePairs: List<Pair<K, V>>): <ERROR CLASS>

containsKey

fun <K> containsKey(subjectProvider: <ERROR CLASS><Map<out K, *>>, key: K): <ERROR CLASS>

containsKeyWithValueAssertions

fun <K, V : Any, T : Map<out K, V?>> containsKeyWithValueAssertions(expect: <ERROR CLASS><T>, valueType: KClass<V>, keyValues: List<Pair<K, (<ERROR CLASS><V>.() -> Unit)?>>): <ERROR CLASS>
fun <K, V : Any> containsKeyWithValueAssertions(plant: <ERROR CLASS><Map<out K, V?>>, keyValues: List<Pair<K, (<ERROR CLASS><V>.() -> Unit)?>>): <ERROR CLASS>

containsNotKey

fun <K> containsNotKey(subjectProvider: <ERROR CLASS><Map<out K, *>>, key: K): <ERROR CLASS>

getExisting

fun <K, V, T : Map<out K, V>> getExisting(expect: <ERROR CLASS><T>, key: K): <ERROR CLASS><T, V>
fun <K, V : Any> getExisting(plant: <ERROR CLASS><Map<out K, V>>, key: K): <ERROR CLASS>
fun <K, V : Any> getExisting(plant: <ERROR CLASS><Map<out K, V>>, key: K, assertionCreator: <ERROR CLASS><V>.() -> Unit): <ERROR CLASS>

getExistingNullable

fun <K, V> getExistingNullable(plant: <ERROR CLASS><Map<out K, V>>, key: K): <ERROR CLASS>
fun <K, V> getExistingNullable(plant: <ERROR CLASS><Map<out K, V>>, key: K, assertionCreator: <ERROR CLASS><V>.() -> Unit): <ERROR CLASS>

hasSize

fun hasSize(plant: <ERROR CLASS><Map<*, *>>, size: Int): <ERROR CLASS>

isEmpty

fun isEmpty(subjectProvider: <ERROR CLASS><Map<*, *>>): <ERROR CLASS>

isNotEmpty

fun isNotEmpty(subjectProvider: <ERROR CLASS><Map<*, *>>): <ERROR CLASS>

keys

fun <K> keys(plant: <ERROR CLASS><Map<out K, *>>, assertionCreator: <ERROR CLASS><Set<K>>.() -> Unit): <ERROR CLASS>

size

fun <T : Map<*, *>> size(expect: <ERROR CLASS><T>): <ERROR CLASS>

values

fun <V> values(plant: <ERROR CLASS><Map<*, V>>, assertionCreator: <ERROR CLASS><Collection<V>>.() -> Unit): <ERROR CLASS>

Extension Functions

asExpect

fun <T, A> A.asExpect(): <ERROR CLASS><T>
fun <T : Any, A> A.asExpect(assertionCreator: <ERROR CLASS><T>.() -> Unit): A

Turns Assert or AssertionPlantNullable into an Expect so that you can use new functionality which is not available on Assert/AssertionPlantNullable.