public void LaunchProcessWithDebuggerAttached_WithParameters_PassedInfoToFrameworkHandleCorrectly() { DebuggedProcessLauncher launcher = new DebuggedProcessLauncher(MockFrameworkHandle.Object); launcher.LaunchProcessWithDebuggerAttached("theCommand", "theDir", "theParams", "C:\\test"); MockFrameworkHandle.Verify(fh => fh.LaunchProcessWithDebuggerAttached( It.Is <string>(s => s == "theCommand"), It.Is <string>(s => s == "theDir"), It.Is <string>(s => s == "theParams"), It.Is <IDictionary <string, string> >(d => d.ContainsKey("PATH") && d["PATH"].StartsWith("C:\\test;")) ), Times.Exactly(1)); }
public void LaunchProcessWithDebuggerAttached_WithParameters_PassedInfoToFrameworkHandleCorrectly() { DebuggedProcessLauncher launcher = new DebuggedProcessLauncher(MockFrameworkHandle.Object); launcher.LaunchProcessWithDebuggerAttached("theCommand", "theDir", "theParams", @"C:\test"); MockFrameworkHandle.Verify(fh => fh.LaunchProcessWithDebuggerAttached( It.Is<string>(s => s == "theCommand"), It.Is<string>(s => s == "theDir"), It.Is<string>(s => s == "theParams"), It.Is<IDictionary<string, string>>(d => d.ContainsKey("PATH") && d["PATH"].StartsWith(@"C:\test;")) ), Times.Exactly(1)); }
private void DoRunTests( IEnumerable<TestCase> allTestCasesInExecutables, ICollection<TestCase> testCasesToRun, IRunContext runContext, IFrameworkHandle frameworkHandle, Stopwatch stopwatch) { bool isRunningInsideVisualStudio = !string.IsNullOrEmpty(runContext.SolutionDirectory); var reporter = new VsTestFrameworkReporter(frameworkHandle, isRunningInsideVisualStudio); var launcher = new DebuggedProcessLauncher(frameworkHandle); _executor = new GoogleTestExecutor(_testEnvironment); _executor.RunTests(allTestCasesInExecutables, testCasesToRun, reporter, launcher, runContext.IsBeingDebugged, runContext.SolutionDirectory); reporter.AllTestsFinished(); stopwatch.Stop(); _testEnvironment.LogInfo($"Google Test execution completed, overall duration: {stopwatch.Elapsed}."); }