ProcessRunner WorkingDirectory Property Delta Engine Documentation

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

public string WorkingDirectory { get; set; }

Property Value

Type: String
Remarks

Tests: DeltaEngine.Tests.Core.ProcessRunnerTests
Examples

2 unit tests call DeltaEngine.Core.ProcessRunner.WorkingDirectory
[Test]
public void DefaultWorkingDirectory()
{
    var processRunner = new ProcessRunner("cmd.exe", "/c dir");
    Assert.AreEqual(Environment.CurrentDirectory, processRunner.WorkingDirectory);
}
[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