Skip to content

ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue>.NotContainKey Method ​

Definition ​

Asserts that the dictionary does not contain the specified key.

c#
public AssertionsChain<ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue>, TDictionary> NotContainKey(TKey? key);

View source

Parameters ​

NameTypeDescription
keyTKeyThe key that should not be present.

Returns ​

AssertionsChain<ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue>, TDictionary>

An AssertionsChain<TAssertions, T> for chaining further assertions.