public void SimpleResponderWithMentionRespondsToMention() { Bot bot = new Bot(); IResponder responder = bot.RespondsTo("Hi").With("Hello, friend!").IfBotIsMentioned().GetResponder(); ResponseContext context = GetResponseContext("Hi, Margie."); Assert.AreEqual(true, responder.CanRespond(context)); }
public void SimpleResponderWithMentionDoesntRespondWithoutMention() { Bot bot = new Bot(); IResponder responder = bot.RespondsTo("Hi").With("Hello, friend!").IfBotIsMentioned().GetResponder(); ResponseContext context = GetResponseContext("Hi, everybody."); Assert.AreEqual(false, responder.CanRespond(context)); }
public void SimpleResponderCanRespond() { Bot bot = new Bot(); IResponder responder = bot.RespondsTo("Hi").With("Hello, friend!").GetResponder(); ResponseContext context = GetResponseContext("Hi everybody."); Assert.AreEqual(true, responder.CanRespond(context)); }