Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
View
4 MbUnitAdapter/MbUnitAdapter/GallioAdapter.cs
@@ -46,12 +46,12 @@ public void Cancel()
public void RunTests(IEnumerable<string> sources, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder)
{
- testRunner.RunTests(sources, testExecutionRecorder);
+ testRunner.RunTests(sources, runContext, testExecutionRecorder);
}
public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder)
{
- testRunner.RunTests(tests, testExecutionRecorder);
+ testRunner.RunTests(tests, runContext, testExecutionRecorder);
}
}
}
View
14 MbUnitAdapter/MbUnitAdapter/TestRunner.cs
@@ -28,7 +28,7 @@ public void Cancel()
launcher.Cancel();
}
- public void RunTests(IEnumerable<string> sources, ITestExecutionRecorder testExecutionRecorder)
+ public void RunTests(IEnumerable<string> sources, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder)
{
launcher = new TestLauncher();
@@ -37,16 +37,19 @@ public void RunTests(IEnumerable<string> sources, ITestExecutionRecorder testExe
launcher.AddFilePattern(source);
}
- RunTests(testExecutionRecorder);
+ RunTests(runContext, testExecutionRecorder);
}
- private void RunTests(ITestExecutionRecorder testExecutionRecorder)
+ private void RunTests(IRunContext runContext, ITestExecutionRecorder testExecutionRecorder)
{
+ if (runContext.InIsolation)
+ launcher.TestProject.TestRunnerFactoryName = StandardTestRunnerFactoryNames.IsolatedAppDomain;
+
launcher.TestProject.AddTestRunnerExtension(new VSTestWindowExtension(testExecutionRecorder, testCaseFactory, testResultFactory));
launcher.Run();
}
- public void RunTests(IEnumerable<TestCase> tests, ITestExecutionRecorder testExecutionRecorder)
+ public void RunTests(IEnumerable<TestCase> tests, IRunContext runContext, ITestExecutionRecorder testExecutionRecorder)
{
launcher = new TestLauncher();
@@ -58,8 +61,7 @@ public void RunTests(IEnumerable<TestCase> tests, ITestExecutionRecorder testExe
SetTestFilter(tests);
- RunTests(testExecutionRecorder);
-
+ RunTests(runContext, testExecutionRecorder);
}
private void SetTestFilter(IEnumerable<TestCase> tests)

No commit comments for this range

Something went wrong with that request. Please try again.