Jayrock.Json.TestJsonObject.CopyToViaGenericCollection C# (CSharp) Method

CopyToViaGenericCollection() private method

private CopyToViaGenericCollection ( ) : void
return void
        public void CopyToViaGenericCollection()
        {
            ICollection<KeyValuePair<string, object>> obj = new JsonObject();
            KeyValuePair<string, object> first = new KeyValuePair<string, object>("first", 123);
            obj.Add(first);
            KeyValuePair<string, object> second = new KeyValuePair<string, object>("second", 456);
            obj.Add(second);
            KeyValuePair<string, object>[] pairs = new KeyValuePair<string, object>[2];
            obj.CopyTo(pairs, 0);
            Assert.AreEqual(first, pairs[0]);
            Assert.AreEqual(second, pairs[1]);
        }
TestJsonObject