You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.8 KiB
62 lines
1.8 KiB
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt) |
|
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt) |
|
|
|
using System; |
|
using System.Windows.Forms; |
|
using ICSharpCode.SharpDevelop.Project; |
|
using ICSharpCode.UnitTesting; |
|
using NUnit.Framework; |
|
using UnitTesting.Tests.Utils; |
|
|
|
namespace UnitTesting.Tests.Tree |
|
{ |
|
/// <summary> |
|
/// Tests that if the parser is still running then we do not |
|
/// add the solution to the unit tests tree. |
|
/// </summary> |
|
[TestFixture] |
|
public class OpenUnitTestsPadWithSolutionOpenTestFixture |
|
{ |
|
DerivedUnitTestsPad pad; |
|
|
|
[TestFixtureSetUp] |
|
public void SetUp() |
|
{ |
|
Solution solution = new Solution(new MockProjectChangeWatcher()); |
|
MockCSharpProject project = new MockCSharpProject(); |
|
MockProjectContent projectContent = new MockProjectContent(); |
|
projectContent.Project = project; |
|
projectContent.Language = LanguageProperties.None; |
|
ReferenceProjectItem refProjectItem = new ReferenceProjectItem(project); |
|
refProjectItem.Include = "NUnit.Framework"; |
|
ProjectService.AddProjectItem(project, refProjectItem); |
|
solution.Folders.Add(project); |
|
|
|
pad = new DerivedUnitTestsPad(solution); |
|
} |
|
|
|
[TestFixtureTearDown] |
|
public void TearDown() |
|
{ |
|
pad.Dispose(); |
|
} |
|
|
|
[Test] |
|
public void NoSolutionAddedToTree() |
|
{ |
|
Assert.AreEqual(0, pad.TestTreeView.GetProjects().Length); |
|
} |
|
|
|
/// <summary> |
|
/// The LoadSolutionProjectsThreadEnded event handler needs to be |
|
/// added before the unit tests pad checks the |
|
/// LoadSolutionProjectsThreadRunning flag so we do not miss the |
|
/// event. |
|
/// </summary> |
|
[Test] |
|
public void ParserServiceLoadSolutionProjectsThreadEndedHandled() |
|
{ |
|
Assert.IsTrue(pad.LoadSolutionProjectsThreadEndedHandled); |
|
} |
|
} |
|
}
|
|
|