Exemple #1
0
                private static TestGroup ParseTestGroup(TreeNode testGroupNode)
                {
                    TestGroup testGroup = new TestGroup(testGroupNode.Text);

                    testGroupNode.Expand();
                    for (int i = 0; i < testGroupNode.Nodes.Count; i++)
                    {
                        if (i < testGroupNode.Nodes.Count - 1)
                        {
                            EnsureTestCaseNodeIsOnScreen(testGroupNode.Nodes[i + 1]);
                        }
                        testGroup.Add(ParseTestCase(testGroupNode.Nodes[i]));
                    }

                    return testGroup;
                }
Exemple #2
0
 private static IDictionary<string, TreeNode> FindTestCaseNodes(TreeNode testGroupNode, List<string> displayNames)
 {
     IDictionary<string, TreeNode> result = new Dictionary<string, TreeNode>();
     testGroupNode.Expand();
     for (int i = 0; result.Count < displayNames.Count && i < testGroupNode.Nodes.Count; i++)
     {
         TreeNode node = testGroupNode.Nodes[i];
         EnsureTestCaseNodeIsOnScreen(node);
         foreach (string displayName in displayNames)
         {
             if (node.Text.StartsWith(displayName))
             {
                 result.Add(displayName, node);
             }
         }
     }
     return result;
 }