Example #1
0
        public void TestMultiPath()
        {
            JsonPath path = new JsonPath(JsonPath.Root);

            path = path.Append("foo");
            path = path.Append("bar");
            Assert.AreEqual(JsonPath.Root + "['foo']['bar']", path.ToString());
        }
        public void ShouldReturnDottedPathFromToString()
        {
            //act
            var path = new JsonPath("Item1.Item2.Item3");

            //assert
            path.ToString().Should().Be("Item1.Item2.Item3");
        }
Example #3
0
        private static void Run(string expected, JsonPath path)
        {
            var actual = path.ToString();

            Assert.AreEqual(expected, actual);
        }