public void CanPurgeQueue() { //publish a few messages to set up the subscriber queue LocalBus.Publish(new TestMessage { Message = "ValueA" }); var purgeCommand = new PurgeCommand(LocalUri.ToString()); purgeCommand.Execute(); }
public ICommand BuildCommand(string command, IUser author, IMessageChannel channel, IGuild guild, params string[] parameters) { ICommand _command = null; switch (command) { case CommandNames.exit: _command = new ExitCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.update: _command = new UpdateCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.restart: _command = new RestartCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.help: _command = new HelpCommand(author, _config, channel, _messageWriter, _commandsInfo, _validationHandler, parameters); break; case CommandNames.version: _command = new VersionCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.random: _command = new RandomCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.github: _command = new GithubCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.uptime: _command = new UptimeCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.color: _command = new ColorCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.flipcoin: _command = new FlipcoinCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.roll: _command = new RollCommand(author, _config, channel, _messageWriter, _validationHandler, parameters); break; case CommandNames.purge: _command = new PurgeCommand(author, _config, channel, _messageWriter, _connectionHandler, _validationHandler, parameters); break; case CommandNames.summon: _command = new SummonCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters); break; case CommandNames.dismiss: _command = new DismissCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters); break; case CommandNames.play: _command = new PlayCommand(author, _config, channel, _messageWriter, _audioService, guild, _validationHandler, parameters); break; default: break; } return(_command); }