mirror of https://github.com/apache/lucene.git
don't just write date to stdout, include date string in failure message
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@577873 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
fada31fa7f
commit
3f517bff75
|
@ -39,7 +39,8 @@ public class TestDateFormater extends TestCase {
|
||||||
Date date = new Date();
|
Date date = new Date();
|
||||||
String formatedDate = DateFormater.formatDate(date,DateFormater.HTTP_HEADER_DATE_FORMAT);
|
String formatedDate = DateFormater.formatDate(date,DateFormater.HTTP_HEADER_DATE_FORMAT);
|
||||||
System.out.println("DATE: " + formatedDate);
|
System.out.println("DATE: " + formatedDate);
|
||||||
assertTrue(pattern.matcher(formatedDate).matches());
|
assertTrue(formatedDate + " does not match expected pattern",
|
||||||
|
pattern.matcher(formatedDate).matches());
|
||||||
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 +0000",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
|
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 +0000",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
|
||||||
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 CEST",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
|
DateFormater.parseDate("Sun, 25 Jun 2006 13:51:23 CEST",DateFormater.HTTP_HEADER_DATE_FORMAT,DateFormater.HTTP_HEADER_DATE_FORMAT_TIME_OFFSET);
|
||||||
//TODO extend this
|
//TODO extend this
|
||||||
|
|
Loading…
Reference in New Issue