diff options
author | Lluis Sanchez <lluis@xamarin.com> | 2014-01-20 19:32:53 +0400 |
---|---|---|
committer | Lluis Sanchez Gual <lluis@xamarin.com> | 2014-10-21 18:39:14 +0400 |
commit | f73b2a9990495587d514aa1856919c21170a3940 (patch) | |
tree | 9842411ee8644ead5915a715ee7e53984a601df4 /main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs | |
parent | a2046b6331a271e8203df7d3d0f14500d33d60fa (diff) |
Initial drop of the new project model
Diffstat (limited to 'main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs')
-rw-r--r-- | main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs b/main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs index 026631b786..8d38969172 100644 --- a/main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs +++ b/main/src/addins/MonoDeveloperExtensions/NUnit/MonoTestProvider.cs @@ -36,19 +36,16 @@ namespace MonoDeveloper { class MonoTestProvider: ITestProvider { - public UnitTest CreateUnitTest (IWorkspaceObject entry) + public UnitTest CreateUnitTest (WorkspaceObject entry) { - if (entry is DotNetProject) { - DotNetProject project = (DotNetProject) entry; - MonoSolutionItemHandler handler = ProjectExtensionUtil.GetItemHandler (project) as MonoSolutionItemHandler; - if (handler != null) { - if (handler.UnitTest != null) - return (UnitTest) handler.UnitTest; - string testFileBase = handler.GetTestFileBase (); - UnitTest testSuite = new MonoTestSuite (project, project.Name, testFileBase); - handler.UnitTest = testSuite; - return testSuite; - } + if (entry is MakefileProject) { + var project = (MakefileProject) entry; + if (project.UnitTest != null) + return (UnitTest) project.UnitTest; + string testFileBase = project.GetTestFileBase (); + UnitTest testSuite = new MonoTestSuite (project, project.Name, testFileBase); + project.UnitTest = testSuite; + return testSuite; } return null; } @@ -63,7 +60,7 @@ namespace MonoDeveloper { string basePath; - public MonoTestSuite (Project p, string name, string basePath): base (name, p) + public MonoTestSuite (MakefileProject p, string name, string basePath): base (name, p) { this.basePath = basePath; } |