Esempio n. 1
0
        public void help_command_is_executed_if_no_command_is_specified_from_the_commandline_2_1()
        {
            var sut = new CleeEngineBuilder().Build();

            sut.Execute((string[])null);

            Assert.Equal("help", sut.History.Single().CommandName);
        }
Esempio n. 2
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);
        }
Esempio n. 3
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);
        }
Esempio n. 4
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());
        }