private static SmartTreeNode CreateOrFindClassNode(ITestAssembly ta, SmartTreeNodeCollection nodes,
                                                           string[] classFullNameParts, int index)
        {
            foreach (SmartTreeNode node in nodes)
            {
                if (node.Text == classFullNameParts[index])
                {
                    index++;
                    if (index < classFullNameParts.Length)
                    {
                        return(CreateOrFindClassNode(ta, node.Nodes, classFullNameParts, index));
                    }
                    else
                    {
                        return(node);
                    }
                }
            }
            SmartTreeNode newNode = new SmartTreeNode(classFullNameParts[index]);

            newNode.ImageIndex = 1;
            newNode.Tag        = new UiElementInfo(ta, new TestSuite(classFullNameParts, index));
            nodes.Add(newNode);
            while (++index < classFullNameParts.Length)
            {
                SmartTreeNode child = new SmartTreeNode(classFullNameParts[index]);
                child.ImageIndex = 1;
                child.Tag        = new UiElementInfo(ta, new TestSuite(classFullNameParts, index));
                newNode.Nodes.Add(child);
                newNode = child;
            }
            newNode.ImageIndex = 2;
            newNode.Tag        = null;
            return(newNode);
        }
        private static SmartTreeNode CreateOrFindMethodNode(SmartTreeNodeCollection nodes, ITestMethodInfo tm)
        {
            foreach (SmartTreeNode node in nodes)
            {
                if (node.Text == tm.Name)
                {
                    return(node);
                }
            }
            SmartTreeNode newNode = new SmartTreeNode(tm.Name);

            newNode.ImageIndex = 3;
            nodes.Add(newNode);
            return(newNode);
        }