Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Tests: DeltaEngine.Tests.Core.ProcessRunnerTests
2 unit tests call DeltaEngine.Core.ProcessRunner.Output
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax
Property Value
Type: StringRemarks
Examples
[Test] public void ChangingWorkingDirectory() { var processRunner = new ProcessRunner("cmd.exe", "/c dir"); processRunner.Start(); var outputWithDefaultWorkingDirectory = processRunner.Output; processRunner.WorkingDirectory = @"C:\"; processRunner.Start(); var outputWithDefinedWorkingDirectory = processRunner.Output; Assert.AreNotEqual(outputWithDefaultWorkingDirectory, outputWithDefinedWorkingDirectory); }
[Test] public void StandardOutputEvent() { var logger = new MockLogger(); var processRunner = new ProcessRunner("cmd.exe", "/c dir"); processRunner.StandardOutputEvent += outputMessage => logger.Write(Logger.MessageType.Info, outputMessage); processRunner.Start(); Assert.IsTrue( logger.LastMessage.Contains("Dir(s)") || logger.LastMessage.Contains("Verzeichnis(se)"), logger.LastMessage); }
See Also