public void ExecuteHook_WhenGivenAProcessThatExitsWithANoneZeroCode_Throws()
        {
            _runner = new CommandLineRunner(_log.Object, _config.Object, _fs.Object, _output);
            var ex = Assert.Throws <HookFailureException>(() => _runner.ExecuteHook(new HookTypeRef("cmd", HookType.File), "/c exit -300"));

            Assert.That(ex.HookFile, Is.EqualTo("cmd"));
            Assert.That(ex.ExitCode, Is.EqualTo(-300));
        }
 public void ExecuteHook_WhenGivenAProcessThatExitsCleanly_DoesntThrow()
 {
     _runner = new CommandLineRunner(_log.Object, _config.Object, _fs.Object, _output);
     _runner.ExecuteHook(new HookTypeRef("cmd", HookType.File), "/c exit 0");
 }