Ejemplo n.º 1
0
        public void executes_expected_help_command()
        {
            var sut = new CleeEngineBuilder().Build();
            sut.Execute("help");

            Assert.Equal("help", sut.History.Single().CommandName);
            Assert.Equal(typeof(HelpCommand), sut.History.Single().ImplementationType);
        }
Ejemplo n.º 2
0
        public void writes_expected_to_output_when_executed()
        {
            var spyOutputWriter = new SpyOutputWriter();

            var sut = new CleeEngineBuilder().Build();
            sut.SetOutputWriter(spyOutputWriter);

            sut.Execute("help");

            Assert.StartsWith("Usage", spyOutputWriter.Output.ToString());
        }
Ejemplo n.º 3
0
        public void help_command_is_executed_if_no_command_is_specified_from_the_commandline_1_1()
        {
            var sut = new CleeEngineBuilder().Build();
            sut.Execute((string)null);

            Assert.Equal("help", sut.History.Single().CommandName);
        }
Ejemplo n.º 4
0
        public void help_command_is_executed_if_no_command_is_specified_from_the_commandline_3_1()
        {
            var sut = new CleeEngineBuilder().Build();
            sut.Execute(
                    commandName: null,
                    args: new Argument[0]
                );

            Assert.Equal("help", sut.History.Single().CommandName);
        }