public void TreeShowsZeroNodesOnZeroMatches() { MatchesTree mt = new MatchesTree(); TreeView tree = mt.TreeView; mt.Display(new NMatchesEventArgs()); Assert.AreEqual(0, tree.Nodes.Count); }
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); }
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); }
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); }