public void CommandMessage(string args, Type commandType, string message) { LogioConfig config = GetTestConfig(); LogioTestClient client = new LogioTestClient(); var parser = new CommandLineArgParser(() => config, x => client); var command = parser.Parse(Helper.CommandLineToArgs(args)); Assert.NotNull(command); Assert.IsType(commandType, command); command.Execute(); Assert.Equal(message, client.Message); }
private LogioConfig RunAndReturnConfig(string args, Type commandType) { var config = GetTestConfig(); var client = new LogioTestClient(); var argsArray = Helper.CommandLineToArgs(args); var parser = new CommandLineArgParser(() => config, x => client); var command = parser.Parse(argsArray); Assert.NotNull(command); Assert.IsType(commandType, command); command.Execute(); return(config); }