public void TestHelpOutput() { iModule mod = new WindowsModule(); mod.run("help", new string[0]); // The return code may indicate // the tests are not being run in an environment // with cmd (e.g. Anything but Windows). if (mod.resultCode() != 2) { // Light check just to ensure some related output came back. Assert.AreEqual(mod.standardOutput().Contains("HELP"), true); } }
public void TestPingOutput() { iModule mod = new WindowsModule(); string[] args = new string[1]; args[0] = "127.0.0.1"; mod.run("ping", args); // The return code may indicate // the tests are not being run in an environment // with cmd (e.g. Anything but Windows). if (mod.resultCode() != 2) { // Light check just to ensure some related output came back. Assert.AreEqual(mod.standardOutput().Contains("Pinging"), true); } }