1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
5
using System.Windows.Forms;
6
using ICSharpCode.SharpDevelop.Dom;
7
using ICSharpCode.SharpDevelop.Project;
8
using ICSharpCode.UnitTesting;
10
using UnitTesting.Tests.Utils;
12
namespace UnitTesting.Tests.Tree
15
/// Tests that if the parser is still running then we do not
16
/// add the solution to the unit tests tree.
19
public class OpenUnitTestsPadWithSolutionOpenTestFixture
21
DerivedUnitTestsPad pad;
26
Solution solution = new Solution(new MockProjectChangeWatcher());
27
MockCSharpProject project = new MockCSharpProject();
28
MockProjectContent projectContent = new MockProjectContent();
29
projectContent.Project = project;
30
projectContent.Language = LanguageProperties.None;
31
ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project);
32
refProjectItem.Include = "NUnit.Framework";
33
ProjectService.AddProjectItem(project, refProjectItem);
34
solution.Folders.Add(project);
36
pad = new DerivedUnitTestsPad(solution);
40
public void TearDown()
46
public void NoSolutionAddedToTree()
48
Assert.AreEqual(0, pad.TestTreeView.GetProjects().Length);
52
/// The LoadSolutionProjectsThreadEnded event handler needs to be
53
/// added before the unit tests pad checks the
54
/// LoadSolutionProjectsThreadRunning flag so we do not miss the
58
public void ParserServiceLoadSolutionProjectsThreadEndedHandled()
60
Assert.IsTrue(pad.LoadSolutionProjectsThreadEndedHandled);