public void BasicTest(string text, DateObject date) { var er = extractor.Extract(text); Assert.AreEqual(1, er.Count); var pr = parser.Parse(er[0]); Assert.AreEqual(Constants.SYS_DATETIME_TIME, pr.Type); Assert.AreEqual(date, ((DTParseResult)pr.Value).FutureValue); }
public void BasicTest(string text, DateObject date) { var er = extractor.Extract(text); Assert.AreEqual(1, er.Count); var pr = parser.Parse(er[0]); Assert.AreEqual(Constants.SYS_DATETIME_TIME, pr.Type); Assert.AreEqual(date, ((DateTimeResolutionResult)pr.Value).FutureValue); TestWriter.Write(TestCulture.English, parser, text, pr); }
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_TIME, results[0].Type); }
public void BasicTest(string text, int start, int length, int expected = 1) { var results = extractor.Extract(text); Assert.AreEqual(expected, results.Count); if (expected < 1) { return; } Assert.AreEqual(start, results[0].Start); Assert.AreEqual(length, results[0].Length); Assert.AreEqual(Constants.SYS_DATETIME_TIME, results[0].Type); }