public async Task WhenRunningChildProcessAndTheResultIsNullThenTheParentGetsTheResult() { // Run the child process and make sure we get a null output TestChildProcessOutput result = await this.childProcessManager.RunChildProcessAsync <TestChildProcessOutput>(ChildProcessName, this.GetInput(RunMode.Null), default(CancellationToken)); Assert.IsNull(result, "Expected NULL result from child process"); this.EnsureProcessStopped(); }
public async Task WhenRunningChildProcessThenTheParentGetsTheResult() { // Run the child process and make sure we get the expected output TestChildProcessOutput result = await this.childProcessManager.RunChildProcessAsync <TestChildProcessOutput>(ChildProcessName, this.GetInput(RunMode.Happy), default(CancellationToken)); Assert.AreEqual(TestChildProcessOutput.ExpectedIntValue, result.IntValue, "Unexpected number received from child process"); Assert.AreEqual(TestChildProcessOutput.ExpectedStringValue, result.StringValue, "Unexpected message received from child process"); this.EnsureProcessStopped(); }