ProcessRunnerTests StandardOutputEvent Method Delta Engine Documentation

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

public void StandardOutputEvent()
Examples

[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