public void ReturnEmpty_GivenNonMatchingMessage() { var chatMessage = new ChatMessage(DateTime.UtcNow, "Brendoneus", "#ffff00", "Hello!"); var result = _commandsSet.GetCommandsToRun(chatMessage); result.Should().BeEmpty(); }
public void Handle(ChatMessage chatMessage, Action <string> respond) { IEnumerable <CustomCommand> toRun = _commandsSet.GetCommandsToRun(chatMessage); foreach (CustomCommand command in toRun) { command.Run(respond); } }