public void FindClosestNode_WhenSearchingForNodeThatDontExist_ShouldGetNull() { var root = CreateNode(); var fondNode = UiFind.ClosestNode(With.Text("second_node_23"), root.Children[0]); Assert.IsNull(fondNode); }
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); }