Exemplo n.º 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());
        }
Exemplo n.º 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());
        }
Exemplo n.º 3
0
        public void testWithGoodData()
        {
            // first element
            XmlNode testNode          = getNode("<get name=\"name\"/>");
            var     mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode);

            Assert.Equal("un-named user", mockBotTagHandler.Transform());

            // last element
            testNode          = getNode("<get name=\"we\"/>");
            mockBotTagHandler = new AIMLbot.AIMLTagHandlers.get(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode);
            Assert.Equal("unknown", mockBotTagHandler.Transform());
        }