示例#1
0
        public void ProcRunner_GetsErrOutput()
        {
            string            batchFile = GenerateTestBatchFile(kAppWithErrOutput);
            ProcConfiguration testApp   = new ProcConfiguration(batchFile);
            ProcRunner        runner    = testApp.BuildRunner();
            ProcRunResults    result    = runner.Run("Test");

            Assert.IsFalse(result.Success);
            Assert.AreEqual("Input: 'Test'", result.ErrorText.Trim('\r', '\n', ' '));
        }
示例#2
0
        public async Task ProcRunner_GetsStdOutput_Async()
        {
            string            batchFile = GenerateTestBatchFile(kAppWithOutput);
            ProcConfiguration testApp   = new ProcConfiguration(batchFile);
            ProcRunner        runner    = testApp.BuildRunner();
            ProcRunResults    result    = await runner.RunAsync("Test");

            Assert.IsTrue(result.Success);
            Assert.AreEqual("Input: 'Test'", result.OutputText.Trim('\r', '\n', ' '));
        }