コード例 #1
0
        public void TreeShowsZeroNodesOnZeroMatches()
        {
            MatchesTree mt = new MatchesTree();
            TreeView tree = mt.TreeView;

            mt.Display(new NMatchesEventArgs());
            Assert.AreEqual(0, tree.Nodes.Count);
        }
コード例 #2
0
        public void TreeShowsOneMatchTextNoBracesIfNoGroupName()
        {
            MatchesTree mt = new MatchesTree();
            TreeView tree = mt.TreeView;

            NMatchesEventArgs args = createNMatchesArgs("a", "a");

            mt.Display(args);
            Assert.AreEqual("[a]", tree.Nodes[0].Text);
        }
コード例 #3
0
        public void TreeShowsOneMatchWithGroupNameIfExists()
        {
            MatchesTree mt = new MatchesTree();
            TreeView tree = mt.TreeView;

            NMatchesEventArgs args = createNMatchesArgs(@"(?<group>a)", "a");

            mt.Display(args);
            Assert.AreEqual("group:[a]", tree.Nodes[0].Nodes[0].Text);
        }
コード例 #4
0
        public void TreeShowsOneMatchNodeOnOneMatch()
        {
            MatchesTree mt = new MatchesTree();
            TreeView tree = mt.TreeView;

            NMatchesEventArgs args = createNMatchesArgs("a","a");

            mt.Display(args);
            Assert.AreEqual(1, tree.Nodes.Count);
        }