public void IfCanRunWrongCommandWithNoOutputRaisesEventRunFinished() { var runSync = new RunSync(); var result = 0; runSync.RunFinished += () => result = 1; runSync.Run("thingdingding"); Assert.AreEqual(1, result); }
public void IfCanRunWrongCommandRaisesEventOutputChanged() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("thingdingding"); Assert.AreEqual("No output", result); }
public void IfCanRunCommandWithNoOutputRaisesEvenOutputChanged() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("write"); Assert.AreEqual("No output", result); }
public void IfCanRunCommandAndReturnOutput() { var runSync = new RunSync(); var result = ""; runSync.OutputChanged += (x) => result = x; runSync.Run("write test"); Assert.AreEqual("test\r\n\r\n", result); }
public void IfCanRunCommandAndRaiseEventRunFinished() { var runSync = new RunSync(); var result = 0; runSync.RunFinished += () => result = 1; runSync.Run("write test"); Assert.AreEqual(1, result); }
public void IfCanRunCommand() { var runSync = new RunSync(); runSync.Run("write test"); }