Fix DateParserTest unit tests that were failing in my locale. #832

Merged
merged 1 commit into from Apr 4, 2017
Jump to file or symbol
Failed to load files and symbols.
+1 −3
Split
@@ -76,7 +76,6 @@ This W3C work (including software, documents, or other related items) is
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;
-import java.text.DateFormat;
import java.util.Date;
/**
@@ -107,8 +106,7 @@ private static void test(final Date date) {
final Date dateRoundTrip = DateParser.parse(isodate);
assertDatesAreClose(date, dateRoundTrip);
- Assert.assertTrue(Math.abs(Date.parse(date.toString()) - Date.parse(dateRoundTrip.toString())) < 10);
-
+ Assert.assertTrue(Math.abs(date.getTime() - dateRoundTrip.getTime()) < 10);
}
@DataProvider(name="dateDate")