doc / ch.tutteli.atrium.domain.creating / MapAssertions

MapAssertions

interface MapAssertions (source)

Defines the minimum set of assertion functions and builders applicable to Map, which an implementation of the domain of Atrium has to provide.

Functions

contains

abstract fun <K, V, T : Map<out K, V>> contains(expect: Expect<T>, keyValuePairs: List<Pair<K, V>>): Assertion
abstract fun <K, V> contains(plant: AssertionPlant<Map<out K, V>>, keyValuePairs: List<Pair<K, V>>): Assertion

containsKey

abstract fun <K> containsKey(subjectProvider: SubjectProvider<Map<out K, *>>, key: K): Assertion

containsKeyWithValueAssertions

abstract fun <K, V : Any, T : Map<out K, V?>> containsKeyWithValueAssertions(expect: Expect<T>, valueType: KClass<V>, keyValues: List<Pair<K, (Expect<V>.() -> Unit)?>>): Assertion
abstract fun <K, V : Any> containsKeyWithValueAssertions(plant: AssertionPlant<Map<out K, V?>>, keyValues: List<Pair<K, (Assert<V>.() -> Unit)?>>): Assertion

containsNotKey

abstract fun <K> containsNotKey(subjectProvider: SubjectProvider<Map<out K, *>>, key: K): Assertion

getExisting

abstract fun <K, V, T : Map<out K, V>> getExisting(expect: Expect<T>, key: K): ExtractedFeaturePostStep<T, V>
abstract fun <K, V : Any> getExisting(plant: AssertionPlant<Map<out K, V>>, key: K): AssertionPlant<V>
abstract fun <K, V : Any> getExisting(plant: AssertionPlant<Map<out K, V>>, key: K, assertionCreator: AssertionPlant<V>.() -> Unit): Assertion

getExistingNullable

abstract fun <K, V> getExistingNullable(plant: AssertionPlant<Map<out K, V>>, key: K): AssertionPlantNullable<V>
abstract fun <K, V> getExistingNullable(plant: AssertionPlant<Map<out K, V>>, key: K, assertionCreator: AssertionPlantNullable<V>.() -> Unit): Assertion

hasSize

abstract fun hasSize(plant: AssertionPlant<Map<*, *>>, size: Int): Assertion

isEmpty

abstract fun isEmpty(subjectProvider: SubjectProvider<Map<*, *>>): Assertion

isNotEmpty

abstract fun isNotEmpty(subjectProvider: SubjectProvider<Map<*, *>>): Assertion

keys

abstract fun <K> keys(plant: AssertionPlant<Map<out K, *>>, assertionCreator: AssertionPlant<Set<K>>.() -> Unit): Assertion

size

abstract fun <T : Map<*, *>> size(expect: Expect<T>): ExtractedFeaturePostStep<T, Int>

values

abstract fun <V> values(plant: AssertionPlant<Map<*, V>>, assertionCreator: AssertionPlant<Collection<V>>.() -> Unit): Assertion

Inheritors

MapAssertionsBuilder

object MapAssertionsBuilder : MapAssertions

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.