Tests.when_adding_range_to_dictionary.then_range_added_to_empty_dictionary_adds_correctly C# (CSharp) Method

then_range_added_to_empty_dictionary_adds_correctly() private method

        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"]);
        }