示例#1
0
        public void Find_WithMenuTopLevelElements_Successful(string element, string expectedPath)
        {
            var finder = new FormElementPathFinder((JObject)JsonConvert.DeserializeObject(MenuMetadata));

            var path = finder.Find("DefaultApplicationMenu", element);

            path.ShouldBe(expectedPath);
        }
示例#2
0
        public void Find_ChildLevelElementsUsingDifferentCasing_Successful()
        {
            var finder = new FormElementPathFinder((JObject)JsonConvert.DeserializeObject(FormMetadata));

            var path = finder.Find("NOTELIST", "_CODE");

            path.ShouldBe("/elements/7/elements/0");
        }
示例#3
0
        public void Find_InnerChildLevelElements_Successful()
        {
            var finder = new FormElementPathFinder((JObject)JsonConvert.DeserializeObject(FormMetadata));

            var path = finder.Find("SubNotes", "_code");

            path.ShouldBe("/elements/7/elements/4/elements/0");
        }
示例#4
0
        public void Find_TopLevelElements_Successful(string element, string expectedPath)
        {
            var finder = new FormElementPathFinder((JObject)JsonConvert.DeserializeObject(FormMetadata));

            var path = finder.Find("CustomerForm", element);

            path.ShouldBe(expectedPath);
        }