Verifies that unexpectedKey is not in the dictionary dictionary.

Namespace:  MbUnit.Framework
Assembly:  MbUnit (in MbUnit.dll) Version: 3.3.0.0 (3.3.610.0)

Syntax

C#
public static void DoesNotContainKey<TKey, TValue>(
	IDictionary<TKey, TValue> dictionary,
	TKey unexpectedKey
)
Visual Basic (Declaration)
Public Shared Sub DoesNotContainKey(Of TKey, TValue) ( _
	dictionary As IDictionary(Of TKey, TValue), _
	unexpectedKey As TKey _
)

Parameters

dictionary
Type: System.Collections.Generic..::.IDictionary<(Of <(TKey, TValue>)>)
The dictionary of items.
unexpectedKey
Type: TKey
The key that should not be found in the dictionary.

Type Parameters

TKey
The type of key.
TValue
The type of value.

Exceptions

ExceptionCondition
Gallio.Framework.Assertions..::.AssertionExceptionThrown if the verification failed unless the current AssertionFailureBehavior indicates otherwise.

See Also