public void BasicTestFuture(string text, DateObject beginDate, DateObject endDate)
        {
            var er = extractor.Extract(text);

            Assert.AreEqual(1, er.Count);
            var pr = parser.Parse(er[0], referenceTime);

            Assert.AreEqual(Constants.SYS_DATETIME_DATETIMEPERIOD, pr.Type);
            Assert.AreEqual(beginDate,
                            ((Tuple <DateObject, DateObject>)((DTParseResult)pr.Value).FutureValue).Item1);
            Assert.AreEqual(endDate,
                            ((Tuple <DateObject, DateObject>)((DTParseResult)pr.Value).FutureValue).Item2);
        }
Beispiel #2
0
        public void BasicTest(string text, int start, int length)
        {
            var results = extractor.Extract(text);

            Assert.AreEqual(1, results.Count);
            Assert.AreEqual(start, results[0].Start);
            Assert.AreEqual(length, results[0].Length);
            Assert.AreEqual(Constants.SYS_DATETIME_DATETIMEPERIOD, results[0].Type);
        }