~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to src/addins/NUnit/Services/NUnitProjectTestSuite.cs

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
using MonoDevelop.Projects;
34
34
using MonoDevelop.Ide;
35
35
using MonoDevelop.Ide.TypeSystem;
 
36
using ICSharpCode.NRefactory.TypeSystem;
36
37
using System;
37
38
 
38
39
namespace MonoDevelop.NUnit
61
62
                
62
63
                public static NUnitProjectTestSuite CreateTest (DotNetProject project)
63
64
                {
64
 
                        foreach (ProjectReference p in project.References)
 
65
                        foreach (var p in project.References)
65
66
                                if (p.Reference.IndexOf ("nunit.framework") != -1 || p.Reference.IndexOf ("nunit.core") != -1)
66
67
                                        return new NUnitProjectTestSuite (project);
67
68
                        return null;
113
114
                        if (RefreshRequired)
114
115
                                UpdateTests ();
115
116
                }
116
 
        
 
117
 
 
118
                public override void GetCustomTestRunner (out string assembly, out string type)
 
119
                {
 
120
                        type = (string) project.ExtendedProperties ["TestRunnerType"];
 
121
                        var asm = project.ExtendedProperties ["TestRunnerAssembly"];
 
122
                        assembly = asm != null ? project.BaseDirectory.Combine (asm.ToString ()).ToString () : null;
 
123
                }
 
124
 
117
125
                protected override string AssemblyPath {
118
126
                        get { return project.GetOutputFileName (IdeApp.Workspace.ActiveConfiguration); }
119
127
                }
127
135
                                // Referenced assemblies which are not in the gac and which are not localy copied have to be preloaded
128
136
                                DotNetProject project = base.OwnerSolutionItem as DotNetProject;
129
137
                                if (project != null) {
130
 
                                        foreach (ProjectReference pr in project.References) {
 
138
                                        foreach (var pr in project.References) {
131
139
                                                if (pr.ReferenceType != ReferenceType.Package && !pr.LocalCopy) {
132
140
                                                        foreach (string file in pr.GetReferencedFileNames (IdeApp.Workspace.ActiveConfiguration))
133
141
                                                                yield return file;