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:
parent
37fd0adafb
commit
b219a449bb
|
@ -1563,6 +1563,7 @@ public class DateUtilsTest {
|
|||
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 class DateUtilsTest {
|
|||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue