Skip to content

ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue> Class ​

Definition ​

Provides assertions for read-only dictionary values.

c#
public sealed class ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue> : ObjectAssertions<ReadOnlyDictionaryAssertions<TDictionary, TKey, TValue>, TDictionary>
   where TDictionary : IReadOnlyDictionary<TKey, TValue>

View source

Type Parameters ​

NameDescription
TDictionaryThe type of the dictionary being asserted on.
TKeyThe type of the dictionary keys.
TValueThe type of the dictionary values.

Constructors ​

NameDescription
ReadOnlyDictionaryAssertions(TDictionary)Provides assertions for read-only dictionary values.

Methods ​

NameDescription
ContainKey(TKey)Asserts that the dictionary contains the specified key.
NotContainKey(TKey)Asserts that the dictionary does not contain the specified key.