public int LaunchProcessWithDebuggerAttached(string command, string workingDirectory, string param, string pathExtension) { IDictionary<string, string> envVariables = new Dictionary<string, string>(); if (!string.IsNullOrEmpty(pathExtension)) envVariables["PATH"] = Utils.GetExtendedPath(pathExtension); return _frameworkHandle.LaunchProcessWithDebuggerAttached(command, workingDirectory, param, envVariables); } }
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)); }