Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Ungureanu <teromario@yahoo.com>2016-05-31 23:40:03 +0300
committerLluis Sanchez <slluis.devel@gmail.com>2016-05-31 23:40:03 +0300
commit0fcc7a078c1c3757c7039d9a1b1ed80d240f5ec6 (patch)
tree054c74e8bd0adc96c506fbe682633ec036f5dfd7 /main/src/addins/MonoDevelop.UnitTesting
parent29eb03090b5b5286f45b8effe918bf93ead6e68b (diff)
[NUnit] Guard against null execution context on running tests. (#1480)
As per 14872cd219d96421caee9a69935c474488fcf94b, we were no longer checking whether the passed context was null. The context we are not assigning as per this change will be fixed up by TestContext in the constructor and assigned a fallback value. Bug 41320 - Run Unit Tests from Run Menu isn't working. Shows NRE in log
Diffstat (limited to 'main/src/addins/MonoDevelop.UnitTesting')
-rw-r--r--main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestService.cs3
1 files changed, 2 insertions, 1 deletions
diff --git a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestService.cs b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestService.cs
index 5816721bcf..5223c31fac 100644
--- a/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestService.cs
+++ b/main/src/addins/MonoDevelop.UnitTesting/Services/UnitTestService.cs
@@ -402,7 +402,8 @@ namespace MonoDevelop.UnitTesting
public TestSession (UnitTest test, MonoDevelop.Projects.ExecutionContext context, TestResultsPad resultsPad, CancellationTokenSource cs)
{
this.test = test;
- this.context = new Projects.ExecutionContext (context.ExecutionHandler, new CustomConsoleFactory (context.ConsoleFactory, cs), context.ExecutionTarget);
+ if (context != null)
+ this.context = new Projects.ExecutionContext (context.ExecutionHandler, new CustomConsoleFactory (context.ConsoleFactory, cs), context.ExecutionTarget);
CancellationTokenSource = cs;
this.monitor = new TestMonitor (resultsPad, CancellationTokenSource);
this.resultsPad = resultsPad;