Example #1
0
        public void ctor_string_JsonValue(string name)
        {
            var value = new Mock <JsonValue>().Object;
            var pair  = new JsonPair(name, value);

            Assert.Equal(name, pair.Name);
            Assert.Same(value, pair.Value);
        }
Example #2
0
        public void ctor_string_JsonValue(string name)
        {
            var value = new Mock<JsonValue>().Object;
            var pair = new JsonPair(name, value);

            Assert.Equal(name, pair.Name);
            Assert.Same(value, pair.Value);
        }
Example #3
0
        public void op_Add_JsonPair()
        {
            var expected = new JsonPair("name", "value");

            var document = new JsonObject
                               {
                                   expected
                               };

            var actual = document.First();

            Assert.Equal(expected, actual);
        }
Example #4
0
        public void opIndexer_int()
        {
            var expected = new JsonPair("name", "value");

            var document = new JsonObject
                               {
                                   expected
                               };

            var actual = document[0];

            Assert.Equal(expected, actual);
        }
Example #5
0
        public void op_Add_JsonPair()
        {
            var expected = new JsonPair("name", "value");

            var document = new JsonObject
            {
                expected
            };

            var actual = document.First();

            Assert.Equal(expected, actual);
        }
Example #6
0
        public void opIndexer_int()
        {
            var expected = new JsonPair("name", "value");

            var document = new JsonObject
            {
                expected
            };

            var actual = document[0];

            Assert.Equal(expected, actual);
        }
Example #7
0
        public void opIndexer_string()
        {
            const string name = "name";
            var expected = new JsonPair(name, "value");

            var document = new JsonObject
                               {
                                   expected
                               };

            var actual = document[name];

            Assert.Equal(expected, actual);
        }
Example #8
0
        public void opIndexer_string()
        {
            const string name     = "name";
            var          expected = new JsonPair(name, "value");

            var document = new JsonObject
            {
                expected
            };

            var actual = document[name];

            Assert.Equal(expected, actual);
        }
Example #9
0
        public void op_GetEnumerator()
        {
            var expected = new JsonPair("name", "value");

            IEnumerable document = new JsonObject
            {
                expected
            };

            foreach (var actual in document)
            {
                Assert.Equal(expected, actual);
            }
        }
Example #10
0
        public void op_GetEnumerator()
        {
            var expected = new JsonPair("name", "value");

            IEnumerable document = new JsonObject
                                       {
                                           expected
                                       };

            foreach (var actual in document)
            {
                Assert.Equal(expected, actual);
            }
        }