Exemple #1
0
        public void FindNextMatchStartingAtParentNode_SingleMatch()
        {
            TreeNode catNode = new TreeNode("Category1");

            m_treeView.Nodes.Add(catNode);
            catNode.Nodes.Add("animal");
            catNode.Nodes.Add("grasshopper");
            catNode.Nodes.Add("locust");
            catNode.Nodes.Add("yak");
            m_treeView.SelectedNode = catNode;
            Assert.AreEqual(KeyTermsTree.FindResult.MatchFound, m_treeView.CallFindNextMatch("locust"));
            Assert.AreEqual("locust", m_treeView.SelectedNode.Text);
            Assert.AreEqual(KeyTermsTree.FindResult.NoMoreMatches, m_treeView.CallFindNextMatch("locust"));
            Assert.AreEqual("locust", m_treeView.SelectedNode.Text);
        }