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); }
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); }
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); }
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()); }