GoogleTestAdapter.TestAdapter.Framework.DebuggedProcessLauncher.LaunchProcessWithDebuggerAttached C# (CSharp) Méthode

LaunchProcessWithDebuggerAttached() public méthode

public LaunchProcessWithDebuggerAttached ( string command, string workingDirectory, string param, string pathExtension ) : int
command string
workingDirectory string
param string
pathExtension string
Résultat int
        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);
        }
    }

Usage Example

        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));
        }
All Usage Examples Of GoogleTestAdapter.TestAdapter.Framework.DebuggedProcessLauncher::LaunchProcessWithDebuggerAttached