public void SetUp()
		{
			solution = new Solution();
			
			// Create a project to display in the test tree view.
			project = new MockCSharpProject(solution, "TestProject");
			ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
			
			// Add a test class with a TestFixture attributes.
			projectContent = new MockProjectContent();
			projectContent.Language = LanguageProperties.None;
			testClass1 = new MockClass(projectContent, "Project.Tests.MyTestFixture");
			testClass1.Attributes.Add(new MockAttribute("TestFixture"));
			projectContent.Classes.Add(testClass1);
			
			testClass2 = new MockClass(projectContent, "Project.MyTestFixture");
			testClass2.Attributes.Add(new MockAttribute("TestFixture"));
			projectContent.Classes.Add(testClass2);
						
			testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
			dummyTreeView = new DummyParserServiceTestTreeView(testFrameworks);
			dummyTreeView.ProjectContentForProject = projectContent;
			
			// Load the projects into the test tree view.
			treeView = dummyTreeView as TestTreeView;
			solution.Folders.Add(project);
			treeView.AddSolution(solution);
			nodes = treeView.Nodes;
			rootNode = (ExtTreeNode)treeView.Nodes[0];
			
			treeView.SelectedNode = rootNode;
			testProject = treeView.SelectedTestProject;
		}
		public void Init()
		{
			solution = new Solution();
			project1 = new MockCSharpProject(solution);
			project1.Name = "A";
			ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project1);
			refProjectItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project1, refProjectItem);
			solution.Folders.Add(project1);
			
			project2 = new MockCSharpProject(solution);
			project2.Name = "Z";
			refProjectItem = new ReferenceProjectItem(project2);
			refProjectItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project2, refProjectItem);
			solution.Folders.Add(project2);
			
			MockProjectContent projectContent = new MockProjectContent();
			projectContent.Project = project1;
			
			treeView = new DummyParserServiceTestTreeView();
			treeView.ProjectContentForProject = projectContent;
			treeView.AddSolution(solution);
			projects = treeView.GetProjects();
		}
		public void SetUp()
		{
			testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
			treeView = new DummyParserServiceTestTreeView(testFrameworks);
			
			// Create a solution with two test projects.
			solution = new Solution(new MockProjectChangeWatcher());
			
			// Create the first test project.
			firstProject = new MockCSharpProject(solution, "FirstTestProject");
			ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(firstProject);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(firstProject, nunitFrameworkReferenceItem);

			// Create the second test project.
			secondProject = new MockCSharpProject(solution, "SecondTestProject");
			nunitFrameworkReferenceItem = new ReferenceProjectItem(secondProject);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(secondProject, nunitFrameworkReferenceItem);
					
			// Add the projects to the solution.
			solution.Folders.Add(firstProject);
			solution.Folders.Add(secondProject);
			
			// Create a dummy project content so the projects will be added
			// to the tree.
			treeView.ProjectContentForProject = new MockProjectContent();
			
			// Add the solution to the tree.
			treeView.AddSolution(solution);
			
			allTestsTreeNode = treeView.Nodes[0] as AllTestsTreeNode;
			firstTestProject = treeView.GetTestProject(firstProject);
			secondTestProject = treeView.GetTestProject(secondProject);
		}
		public void Init()
		{
			testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
			treeView = new DummyParserServiceTestTreeView(testFrameworks);
			treeView.ProjectContentForProject = new MockProjectContent();
			
			project = new MockCSharpProject();
			project.Name = "MyProject";
			
			ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project);
			refProjectItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project, refProjectItem);
			
			treeView.AddProject(project);
		}
		public void Init()
		{
			// Create a project to display in the test tree view.
			MockCSharpProject project = new MockCSharpProject();
			project.Name = "TestProject";
			ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
			List<IProject> projects = new List<IProject>();
			projects.Add(project);
					
			// Add a test class with a TestFixture attributes.
			projectContent = new MockProjectContent();
			projectContent.Language = LanguageProperties.None;
			TestClass testClass = CreateTestClass("MyTests.MyTestFixture");
			projectContent.Classes.Add(testClass.Class);
			
			// Add two methods to the test class only
			// one of which has test attributes.
			MockMethod testMethod = new MockMethod("NameExists");
			testMethod.Attributes.Add(new MockAttribute("Test"));
			testMethod.DeclaringType = testClass.Class;
			testClass.Class.Methods.Add(testMethod);
					
			// Init mock project content to be returned.
			treeView = new DummyParserServiceTestTreeView();
			treeView.ProjectContentForProject = projectContent;
			
			// Load the projects into the test tree view.
			treeView.AddProjects(projects);
			projectNode = (TestProjectTreeNode)treeView.Nodes[0];
			testProject = projectNode.TestProject;
			
			// Initialise the root node so the child nodes are created.
			projectNode.PerformInitialization();
			myTestsNamespaceNode = (TestNamespaceTreeNode)projectNode.FirstNode;
			
			// Initialise the first namespace node.
			myTestsNamespaceNode.PerformInitialization();
			testFixtureNode = (TestClassTreeNode)myTestsNamespaceNode.FirstNode;
		
			// Initialise the test method tree nodes.
			testFixtureNode.PerformInitialization();
		}
		public void Init()
		{
			solution = new Solution();
			testProject = new MockCSharpProject(solution, "A");
			solution.Folders.Add(testProject);
			
			nonTestProject = new MockCSharpProject(solution, "Z");
			solution.Folders.Add(nonTestProject);
			
			MockProjectContent projectContent = new MockProjectContent();
			
			testFrameworks = new MockRegisteredTestFrameworks();
			testFrameworks.AddTestProject(testProject);
			
			treeView = new DummyParserServiceTestTreeView(testFrameworks);
			treeView.ProjectContentForProject = projectContent;
			treeView.AddSolution(solution);
			projects = treeView.GetProjects();
		}
		public void SetUp()
		{
			// Create solution.
			solution = new Solution();
			
			// Create a project to display in the test tree view.
			project = new MockCSharpProject();
			project.Name = "TestProject";
			ReferenceProjectItem nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
			
			// Add a test class with a TestFixture attributes.
			projectContent = new MockProjectContent();
			projectContent.Language = LanguageProperties.None;
			testClass = new MockClass("MyTestFixture");
			testClass.Attributes.Add(new MockAttribute("TestFixture"));
			testClass.ProjectContent = projectContent;
			projectContent.Classes.Add(testClass);
						
			// Init mock project content to be returned.
			dummyTreeView = new DummyParserServiceTestTreeView();
			dummyTreeView.ProjectContentForProject = projectContent;
			
			// Load the projects into the test tree view.
			treeView = dummyTreeView as TestTreeView;
			solution.Folders.Add(project);
			treeView.AddSolution(solution);
			nodes = treeView.Nodes;
			rootNode = (ExtTreeNode)treeView.Nodes[0];
			
			// Expand the root node so any child nodes are
			// lazily created.
			rootNode.Expanding();
			rootChildNodes = rootNode.Nodes;
			testFixtureNode = (ExtTreeNode)rootNode.Nodes[0];
		}
		public void Init()
		{
			solution = new Solution(new MockProjectChangeWatcher());
			project1 = new MockCSharpProject(solution, "A");
			ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project1);
			refProjectItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project1, refProjectItem);
			solution.Folders.Add(project1);
			
			project2 = new MockCSharpProject(solution, "Z");
			refProjectItem = new ReferenceProjectItem(project2);
			refProjectItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project2, refProjectItem);
			solution.Folders.Add(project2);
			
			MockProjectContent projectContent = new MockProjectContent();
			projectContent.Project = project1;
			
			testFrameworks = new MockTestFrameworksWithNUnitFrameworkSupport();
			treeView = new DummyParserServiceTestTreeView(testFrameworks);
			treeView.ProjectContentForProject = projectContent;
			treeView.AddSolution(solution);
			projects = treeView.GetProjects();
		}
		public void SetUp()
		{
			// Create a project to display in the test tree view.
			project = new MockCSharpProject();
			project.Name = "TestProject";
			nunitFrameworkReferenceItem = new ReferenceProjectItem(project);
			nunitFrameworkReferenceItem.Include = "NUnit.Framework";
			ProjectService.AddProjectItem(project, nunitFrameworkReferenceItem);
			List<IProject> projects = new List<IProject>();
			projects.Add(project);
			
			// Add second non-test project.
			projects.Add(new MockCSharpProject());
			
			// Add a test class with a TestFixture attributes.
			projectContent = new MockProjectContent();
			projectContent.Language = LanguageProperties.None;
			testClass = new MockClass("RootNamespace.Tests.MyTestFixture");
			testClass.Namespace = "RootNamespace.Tests";
			testClass.Attributes.Add(new MockAttribute("TestFixture"));
			testClass.ProjectContent = projectContent;
			projectContent.Classes.Add(testClass);
			
			// Add two methods to the test class only
			// one of which has test attributes.
			testMethod = new MockMethod("NameExists");
			testMethod.Attributes.Add(new MockAttribute("Test"));
			testMethod.DeclaringType = testClass;
			testClass.Methods.Add(testMethod);
			testClass.Methods.Add(new MockMethod());
					
			// Add a second class that has no test fixture attribute.
			MockClass nonTestClass = new MockClass();
			nonTestClass.ProjectContent = projectContent;
			projectContent.Classes.Add(nonTestClass);
			
			// Init mock project content to be returned.
			dummyTreeView = new DummyParserServiceTestTreeView();
			dummyTreeView.ProjectContentForProject = projectContent;
			
			// Load the projects into the test tree view.
			treeView = dummyTreeView as TestTreeView;	
			treeView.AddProjects(projects);
			nodes = treeView.Nodes;
			rootNode = (ExtTreeNode)treeView.Nodes[0];
			
			// Expand the root node so any child nodes are
			// lazily created.
			rootNode.Expanding();
			rootChildNodes = rootNode.Nodes;
			rootNamespaceNode = (ExtTreeNode)rootNode.Nodes[0];
			
			// Expand the first namespace node.
			rootNamespaceNode.Expanding();
			rootNamespaceChildNodes = rootNamespaceNode.Nodes;
			testsNamespaceNode = (ExtTreeNode)rootNamespaceNode.Nodes[0];
		
			// Expand the tests namespace node.
			testsNamespaceNode.Expanding();
			testsNamespaceChildNodes = testsNamespaceNode.Nodes;
			testFixtureNode = (ExtTreeNode)testsNamespaceNode.Nodes[0];
		
			// Expand the test node.
			testFixtureNode.Expanding();
			testFixtureChildNodes = testFixtureNode.Nodes;
			testNode = (ExtTreeNode)testFixtureChildNodes[0];
		}