public void ReturnEmpty_GivenNonMatchingMessage()
        {
            var chatMessage = new ChatMessage(DateTime.UtcNow, "Brendoneus", "#ffff00", "Hello!");

            var result = _commandsSet.GetCommandsToRun(chatMessage);

            result.Should().BeEmpty();
        }
예제 #2
0
        public void Handle(ChatMessage chatMessage, Action <string> respond)
        {
            IEnumerable <CustomCommand> toRun = _commandsSet.GetCommandsToRun(chatMessage);

            foreach (CustomCommand command in toRun)
            {
                command.Run(respond);
            }
        }