Example #1
0
        public void testBadInput()
        {
            XmlNode testNode          = getNode("<dote/>");
            var     mockBotTagHandler = new AIMLbot.AIMLTagHandlers.date(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode);

            Assert.Equal("", mockBotTagHandler.Transform());
        }
Example #2
0
        public void testExpectedInput()
        {
            XmlNode  testNode          = getNode("<date/>");
            var      mockBotTagHandler = new AIMLbot.AIMLTagHandlers.date(this.mockBot, this.mockUser, this.mockQuery, mockRequest, mockResult, testNode);
            DateTime now      = DateTime.Now;
            DateTime expected = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second);

            Assert.Equal(expected.ToString(this.mockBot.Locale), mockBotTagHandler.Transform());
        }