ProcessRunner Output Property Delta Engine Documentation

Namespace: DeltaEngine.Core
Assembly: DeltaEngine (in DeltaEngine.dll) Version: 1.1.1.0 (1.1.1)
Syntax

public string Output { get; }

Property Value

Type: String
Remarks

Tests: DeltaEngine.Tests.Core.ProcessRunnerTests
Examples

2 unit tests call DeltaEngine.Core.ProcessRunner.Output
[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