infix fun <K, V, T : Map<out K, V>> Expect<T>.containsOnly(keyValuePair: Pair<K, V>): Expect<T>
(source)
Expects that the subject of this
expectation (a Map) contains only one entry with a key as defined by
keyValuePair's Pair.first and a corresponding value as defined by keyValuePair's Pair.second
Delegates to 'it contains o inAny order but only entry keyValuePair'.
Return
an Expect for the subject of this
expectation.
infix fun <K, V, T : Map<out K, V>> Expect<T>.containsOnly(keyValuePairs: Pairs<K, V>): Expect<T>
(source)
Expects the subject of this
expectation (a Map) contains only (in any order) for each entry in keyValuePairs,
a key as defined by that entry's Pair.first with a corresponding value as defined by entry's Pair.second.
Delegates to it contains o inAny order but only the keyValuePairs
keyValuePairs
- The key-value Pairs expected to be contained within this Map
-- use the function pairs(x to y, ...)
to create a Pairs.
Return
an Expect for the subject of this
expectation.
inline infix fun <K, reified V : Any, T : Map<out K, V?>> Expect<T>.containsOnly(keyValue: KeyWithValueCreator<K, V>): Expect<T>
(source)
Expects that the subject of this
expectation (a Map) contains only one entry with a key as defined by
keyValue's KeyWithValueCreator.key with a corresponding value which either holds all assertions keyValue's
KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs to be null
in case
KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null
Delegates to it contains o inAny order but only entry keyValue
keyValue
- The KeyWithValueCreator whose key is expected to be contained within this Map and
where the corresponding value holds all assertions the KeyWithValueCreator.valueAssertionCreatorOrNull creates
or needs to be null
in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null
-- use the function keyValue(x) { ... }
to create a KeyWithValueCreator.
Return
an Expect for the subject of this
expectation.
inline infix fun <K, reified V : Any, T : Map<out K, V?>> Expect<T>.containsOnly(allKeyValues: KeyValues<K, V>): Expect<T>
(source)
Expects that the subject of this
expectation (a Map) contains only (in any order) for each KeyWithValueCreator
in allKeyValues, a key as defined by KeyWithValueCreator.key with a corresponding value which either holds all
assertions KeyWithValueCreator's KeyWithValueCreator.valueAssertionCreatorOrNull creates or needs
to be null
in case KeyWithValueCreator.valueAssertionCreatorOrNull is defined as null
Delegates to it contains o inAny order but only the keyValues
Return
an Expect for the subject of this
expectation.