Пример #1
0
        public void AddRange_NewKey_CreatesList()
        {
            var dict = new OneToManyDictionary <string, int>();

            dict.AddRange("key", new[] { 42, 43 });

            var values = dict["key"];

            Assert.IsTrue(values.SequenceEqual(42, 43));
        }
Пример #2
0
        public void AddRange_ExistingKey_AppendsToList()
        {
            var dict = new OneToManyDictionary <string, int>();

            dict.Add("key", 42);
            dict.AddRange("key", new[] { 43, 44 });

            var values = dict["key"];

            Assert.IsTrue(values.SequenceEqual(42, 43, 44));
        }
		public void AddRange_ExistingKey_AppendsToList()
		{
			var dict = new OneToManyDictionary<string, int>();
			dict.Add("key", 42);
			dict.AddRange("key", new[] { 43, 44 });

			var values = dict["key"];

			Assert.IsTrue(values.SequenceEqual(42, 43, 44));
		}
		public void AddRange_NewKey_CreatesList()
		{
			var dict = new OneToManyDictionary<string, int>();
			dict.AddRange("key", new[] { 42, 43 });

			var values = dict["key"];

			Assert.IsTrue(values.SequenceEqual(42, 43));
		}