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();
        }
Пример #2
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 Init()
        {
            solution    = new Solution(new MockProjectChangeWatcher());
            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 GetProjectsAfterClear()
 {
     treeView.Clear();
     Assert.AreEqual(0, treeView.GetProjects().Length);
 }