Fixed: Failing Process provider test

pull/6/head
ta264 5 years ago
parent 2284313d4d
commit 2768fce0a4

@ -66,10 +66,10 @@ namespace NzbDrone.Common.Test
[Test] [Test]
public void Should_be_able_to_start_process() public void Should_be_able_to_start_process()
{ {
var process = Subject.Start(Path.Combine(Directory.GetCurrentDirectory(), DummyApp.DUMMY_PROCCESS_NAME + ".exe")); var process = StartDummyProcess();
Subject.Exists(DummyApp.DUMMY_PROCCESS_NAME).Should() Subject.Exists(DummyApp.DUMMY_PROCCESS_NAME).Should()
.BeTrue("excepted one dummy process to be already running"); .BeTrue("expected one dummy process to be already running");
process.Kill(); process.Kill();
process.WaitForExit(); process.WaitForExit();
@ -92,7 +92,7 @@ namespace NzbDrone.Common.Test
private Process StartDummyProcess() private Process StartDummyProcess()
{ {
return Subject.Start(DummyApp.DUMMY_PROCCESS_NAME + ".exe"); return Subject.Start(Path.Combine(TestContext.CurrentContext.TestDirectory, DummyApp.DUMMY_PROCCESS_NAME + ".exe"));
} }
[Test] [Test]

Loading…
Cancel
Save