Пример #1
0
 public void InvokeCmd_Error()
 {
     Miscellany.InvokeCmd(new string[] { "NOT_RECOGNIZED_COMMAND" }, out var output, out var error);
     Assert.IsTrue(error.Contains("'NOT_RECOGNIZED_COMMAND' is not recognized"));
 }
Пример #2
0
 public void InvokeCmd()
 {
     Miscellany.InvokeCmd(new string[] { "cd c:\\Windows", "echo %CD%" }, out var output, out var error);
     Assert.IsTrue(output.Contains("c:\\Windows"));
     Assert.IsTrue(error == string.Empty);
 }