Пример #1
0
        public void ShouldBeAbleToRunWithArgumentsOnCommand()
        {
            const string Argument           = "--help";
            IRunOptions  expectedRunOptions = null;

            _runner.BuildArgument(Arg.Any <Argument>()).Returns(Argument);
            _runner.Run(Arg.Any <IRunOptions>())
            .ReturnsForAnyArgs("")
            .AndDoes(info => expectedRunOptions = info.Arg <IRunOptions>());

            cmd.git(help: true);

            Assert.NotNull(expectedRunOptions);
            Assert.Equal("git", expectedRunOptions.Command);
            Assert.Equal(expectedRunOptions.Arguments, Argument);
        }