public void Add_ThrowsException_WhenKeyIsNull() { _dictionary = new SingleDictionary <string, string>(); Action Do = () => _dictionary.Add(null, "value2"); Do.Should().Throw <ArgumentNullException>(); }
public void Add_AddKeyValue_WhenDictionaryIsEmpty() { _dictionary = new SingleDictionary <string, string>(); _dictionary.Add(new KeyValuePair <string, string> ("key2", "value2")); _dictionary.AsEnumerable().Should().BeEquivalentTo(new KeyValuePair <string, string>[] { new KeyValuePair <string, string>("key2", "value2") }); }
public void Add_ThrowsNotImplementedException_WhenDictionaryIsNotEmpty() { Action Do = () => _dictionary.Add("key2", "value2"); Do.Should().Throw <NotImplementedException>(); }