Tests.when_adding_range_to_dictionary.then_range_added_to_existing_dictionary_adds_correctly C# (CSharp) Method

then_range_added_to_existing_dictionary_adds_correctly() private method

        public void then_range_added_to_existing_dictionary_adds_correctly()
        {
            Dictionary<string, string> stuff = new Dictionary<string, string> {{"ONE", "one"}};

            stuff.AddRange(s => s.ToUpperInvariant(), new[] { "two", "three" });

            Assert.AreEqual(3, stuff.Count);
            Assert.IsTrue(stuff.ContainsKey("TWO"));
            Assert.AreEqual("two", stuff["TWO"]);
            Assert.IsTrue(stuff.ContainsKey("THREE"));
            Assert.AreEqual("three", stuff["THREE"]);
        }