public void IDictionary_NonGeneric_Contains_KeyOfWrongType(int count) { if (!IsReadOnly) { IDictionary dictionary = new LightDictionary <string, int>(); Assert.False(dictionary.Contains(1)); } }
public void LightDictionary_Generic_ContainsValue_Present(int count) { LightDictionary <TKey, TValue> dictionary = (LightDictionary <TKey, TValue>)GenericIDictionaryFactory(count); int seed = 4315; KeyValuePair <TKey, TValue> notPresent = CreateT(seed++); while (dictionary.Contains(notPresent)) { notPresent = CreateT(seed++); } dictionary.Add(notPresent.Key, notPresent.Value); Assert.True(dictionary.ContainsValue(notPresent.Value)); }