Ejemplo n.º 1
0
        public void PingNotExistingHost_CommandFails()
        {
            var testable = new BatchCommand("ping", "IHopeToGodThisHostDoesntExist");

            CommandResult result = testable.Execute();

            Assert.IsFalse(result.Success);
        }
Ejemplo n.º 2
0
        public void HostName_RunsCorrectly()
        {
            var testable = new BatchCommand("hostname");

            CommandResult result = testable.Execute();

            Assert.IsTrue(result.Success);
            Assert.AreEqual(0, result.Errors.Count);
            Assert.AreEqual(Environment.MachineName, _outputString.ToString().Trim());
        }