Пример #1
0
        public void CanWorkAsDictionary()
        {
            DetailCollection collection = new DetailCollection();

            collection.Replace(new Dictionary <string, object> {
                { "One", 1 }, { "Two", 2 }, { "Three", 3 }
            });
            var dict = collection.AsDictionary();

            dict.Count.ShouldBe(3);
            dict["One"].ShouldBe(1);
            dict["Two"].ShouldBe(2);
            dict["Three"].ShouldBe(3);
        }
Пример #2
0
		public void CanReplaceInDictionary()
		{
			DetailCollection collection = new DetailCollection();
			collection.Replace(new Dictionary<string, object> { { "One", 1 }, { "Two", 2 } });
			collection.Replace(new Dictionary<string, object> { { "One", 1 }, { "Three", 3 } });
			var dict = collection.AsDictionary();

			dict.Count.ShouldBe(2);
			dict["One"].ShouldBe(1);
			dict["Three"].ShouldBe(3);
		}