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 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()); }
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); }
public void default_engine_returns_expected_registry() { var engine = new CleeEngineBuilder().Build(); Assert.IsType<DefaultCommandRegistry>(engine.Registry); }
public void default_engine_returns_expected_mapper() { var engine = new CleeEngineBuilder().Build(); Assert.IsType<DefaultArgumentMapper>(engine.Mapper); }
public void default_engine_returns_expected_factort() { var engine = new CleeEngineBuilder().Build(); Assert.IsType<DefaultCommandFactory>(engine.Factory); }
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); }