public void testWithBadXml() { XmlNode testNode = StaticHelpers.getNode("<soze/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.size(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("", this.mockBotTagHandler.Transform()); }
public void testWithValidData() { XmlNode testNode = StaticHelpers.getNode("<size/>"); this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.size(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode); Assert.AreEqual("0", this.mockBotTagHandler.Transform()); AIMLbot.Utils.AIMLLoader loader = new AIMLbot.Utils.AIMLLoader(this.mockBot); loader.loadAIML(); Assert.AreEqual(Convert.ToString(sizeTagTests.Size), this.mockBotTagHandler.Transform()); }