<PackageReference Include="NUnit" Version="3.14.0" />

DictionaryContainsKeyConstraint

DictionaryContainsKeyConstraint is used to test whether a dictionary contains an expected object as a key.
protected object Expected { get; }

Gets the expected object

Flag the constraint to ignore case and return self.

public DictionaryContainsKeyConstraint(object expected)

Construct a DictionaryContainsKeyConstraint

public DictionaryContainsKeyConstraint Using<TCollectionType, TMemberType>(Func<TCollectionType, TMemberType, bool> comparison)

Flag the constraint to use the supplied predicate function

Flag the constraint to use the supplied Comparison object.

Flag the constraint to use the supplied IComparer object.

Flag the constraint to use the supplied IComparer object.

Flag the constraint to use the supplied IEqualityComparer object.

Flag the constraint to use the supplied IEqualityComparer object.

public CollectionItemsEqualConstraint Using<T>(Func<T, T, bool> comparer)

Flag the constraint to use the supplied boolean-returning delegate.

Returns a new DictionaryContainsKeyValuePairConstraint checking for the presence of a particular key-value-pair in the dictionary.