ProcessRunnerTests ChangingWorkingDirectory 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 ChangingWorkingDirectory()
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);
}
See Also