Esempio n. 1
0
        public void testBadInput()
        {
            XmlNode testNode = StaticHelpers.getNode("<dote/>");

            this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.date(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode);
            Assert.AreEqual("", this.mockBotTagHandler.Transform());
        }
Esempio n. 2
0
 public void testExpectedInput()
 {
     XmlNode testNode = StaticHelpers.getNode("<date/>");
     this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.date(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode);
     DateTime now = DateTime.Now;
     DateTime expected = new DateTime(now.Year, now.Month, now.Day, now.Hour, now.Minute, now.Second);
     Assert.AreEqual(expected.ToString(this.mockBot.Locale), this.mockBotTagHandler.Transform());
 }
Esempio n. 3
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());
        }
Esempio n. 4
0
 public void testBadInput()
 {
     XmlNode testNode = StaticHelpers.getNode("<dote/>");
     this.mockBotTagHandler = new AIMLbot.AIMLTagHandlers.date(this.mockBot, this.mockUser, this.mockQuery, this.mockRequest, this.mockResult, testNode);
     Assert.AreEqual("", this.mockBotTagHandler.Transform());
 }