LANG-799 Add tests to show ParseException when default Locale is wrong

Add Strictly tests for valid strings

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/lang/trunk@1388793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Sebastian Bazley 2012-09-22 12:41:16 +00:00
parent 37fd0adafb
commit b219a449bb
1 changed files with 2 additions and 0 deletions

View File

@ -1563,6 +1563,7 @@ public void testLANG799_EN_OK() throws ParseException {
Locale.setDefault(Locale.ENGLISH);
try {
DateUtils.parseDate("Wed, 09 Apr 2008 23:55:38 GMT", "EEE, dd MMM yyyy HH:mm:ss zzz");
DateUtils.parseDateStrictly("Wed, 09 Apr 2008 23:55:38 GMT", "EEE, dd MMM yyyy HH:mm:ss zzz");
} finally {
Locale.setDefault(dflt);
}
@ -1586,6 +1587,7 @@ public void testLANG799_DE_OK() throws ParseException {
Locale.setDefault(Locale.GERMAN);
try {
DateUtils.parseDate("Mi, 09 Apr 2008 23:55:38 GMT", "EEE, dd MMM yyyy HH:mm:ss zzz");
DateUtils.parseDateStrictly("Mi, 09 Apr 2008 23:55:38 GMT", "EEE, dd MMM yyyy HH:mm:ss zzz");
} finally {
Locale.setDefault(dflt);
}