/// <summary>
        /// A new test class has been added to the project so a new
        /// tree node is added if the class belongs to this namespace.
        /// </summary>
        void TestClassAdded(object source, TestClassEventArgs e)
        {
            if (e.TestClass.Namespace == fullNamespace)
            {
                // Add test class to our monitored test classes.
                testClasses.Add(e.TestClass);

                // Add a new tree node.
                TestClassTreeNode classNode = new TestClassTreeNode(TestProject, e.TestClass);
                classNode.AddTo(this);

                // Sort the nodes.
                SortChildNodes();
            }
            else if (isInitialized && NamespaceStartsWith(e.TestClass.Namespace))
            {
                // Check if there is a child namespace node for the class.
                string childNamespace = TestClass.GetChildNamespace(e.TestClass.Namespace, fullNamespace);
                if (!NamespaceNodeExists(childNamespace))
                {
                    // Add a new namespace node.
                    TestNamespaceTreeNode node = new TestNamespaceTreeNode(TestProject, fullNamespace, childNamespace);
                    node.AddTo(this);

                    // Sort the nodes.
                    SortChildNodes();
                }
            }
        }
 /// <summary>
 /// Gets the test classes for this namespace.
 /// </summary>
 void GetTestClasses()
 {
     testClasses = new TestClassCollection();
     foreach (TestClass c in TestProject.GetTestClasses(fullNamespace))
     {
         testClasses.Add(c);
     }
     testClasses.ResultChanged += TestClassesResultChanged;
 }
 void GetTestClasses()
 {
     testClasses = new TestClassCollection();
     foreach (IClass c in projectContent.Classes)
     {
         if (IsTestClass(c))
         {
             if (!testClasses.Contains(c.FullyQualifiedName))
             {
                 testClasses.Add(CreateTestClass(c));
             }
         }
         foreach (IClass innerClass in new InnerClassEnumerator(c))
         {
             if (IsTestClass(innerClass))
             {
                 if (!testClasses.Contains(innerClass.DotNetName))
                 {
                     testClasses.Add(CreateTestClass(innerClass));
                 }
             }
         }
     }
 }