示例#1
0
        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());
        }
示例#2
0
        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());
        }
示例#3
0
        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());
        }
示例#4
0
        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());
        }
示例#5
0
        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());
        }
示例#6
0
 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());
 }
示例#7
0
 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());
 }