public void testWithNonExistentPredicate() { XmlNode testNode = getNode("<get name=\"nonexistent\"/>"); var mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode); Assert.Equal("", mockBotTagHandler.Transform()); }
public void testWithNoAttributes() { XmlNode testNode = getNode("<get/>"); var mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode); Assert.Equal("", mockBotTagHandler.Transform()); }
public void testWithTooManyAttributes() { XmlNode testNode = StaticHelpers.getNode("<get name=\"we\" value=\"value\" />"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("", this.mockBotTagHandler.Transform()); }
public void testWithGoodData() { // first element XmlNode testNode = StaticHelpers.getNode("<get name=\"name\"/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("un-named user", this.mockBotTagHandler.Transform()); // last element testNode = StaticHelpers.getNode("<get name=\"we\"/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("unknown", this.mockBotTagHandler.Transform()); }
public void testWithNoAttributes() { XmlNode testNode = StaticHelpers.getNode("<get/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("", this.mockBotTagHandler.Transform()); }
public void testWithNonExistentPredicate() { XmlNode testNode = StaticHelpers.getNode("<get name=\"nonexistent\"/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("", this.mockBotTagHandler.Transform()); }