コード例 #1
0
        public void FindClosestNode_WhenSearchingForNodeThatDontExist_ShouldGetNull()
        {
            var root     = CreateNode();
            var fondNode = UiFind.ClosestNode(With.Text("second_node_23"), root.Children[0]);

            Assert.IsNull(fondNode);
        }
コード例 #2
0
        public void FindClosestNode_WhenComplexSearchingForNodeThatExist_ShouldGetNode()
        {
            var root     = CreateNode();
            var fondNode = UiFind.ClosestNode(With.Text("third_node_1_1_1"), root.Children[0]);

            Assert.IsNotNull(fondNode);
            Assert.AreEqual(root.Children[1].Children[1].Children[1], fondNode);
        }