private then_range_added_to_empty_dictionary_adds_correctly ( ) : void | ||
return | void |
public void then_range_added_to_empty_dictionary_adds_correctly()
{
Dictionary<string, string> stuff = new Dictionary<string, string>();
stuff.AddRange(s => s.ToUpperInvariant().Remove(2), new[]{"one", "two", "three"});
Assert.AreEqual(3, stuff.Count);
Assert.IsTrue(stuff.ContainsKey("ON"));
Assert.AreEqual("one", stuff["ON"]);
Assert.IsTrue(stuff.ContainsKey("TW"));
Assert.AreEqual("two", stuff["TW"]);
Assert.IsTrue(stuff.ContainsKey("TH"));
Assert.AreEqual("three", stuff["TH"]);
}