public void Execute_CancellationTokenIsAlreadyCancelled_ProcessNotExecuted()
        {
            var exeName = WriteBatchFileForTest(TestContext,
                                                @"@echo Hello world
xxx yyy
@echo Testing 1,2,3...>&2
");

            var logger = new TestLogger();
            var args   = new ProcessRunnerArguments(exeName, true);
            var runner = CreateProcessRunner(logger);

            args.CancellationToken = new CancellationToken(true);

            // Act
            var success = runner.Execute(args);

            // Assert
            success.Should().BeFalse();
            runner.ExitCode.Should().Be(0, "Unexpected exit code");

            logger.AssertOutputStringDoesNotExist("Hello world");
        }
 public static void AssertMessageNotLogged(this TestLogger logger, string expected)
 {
     logger.AssertOutputStringDoesNotExist(expected);
 }