File tree Expand file tree Collapse file tree
src/test/org/apache/commons/cli2/validation Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1717package org .apache .commons .cli2 .validation ;
1818
1919import java .text .DateFormat ;
20+ import java .text .DateFormatSymbols ;
2021import java .text .SimpleDateFormat ;
2122import java .util .Arrays ;
2223import java .util .Calendar ;
@@ -59,7 +60,8 @@ public void testSingleFormatValidate()
5960
6061 public void testDefaultDateFormatValidate ()
6162 throws InvalidArgumentException {
62- final Object [] array = new Object [] { "23-Dec-2003" };
63+ DateFormatSymbols symbols = new DateFormatSymbols ();
64+ final Object [] array = new Object [] { "23-" + symbols .getShortMonths ()[11 ] + "-2003" };
6365 final List list = Arrays .asList (array );
6466 final Validator validator = new DateValidator ( new SimpleDateFormat ("dd-MMM-yyyy" ) );
6567
@@ -89,7 +91,8 @@ public void testDefaultTimeFormatValidate()
8991
9092 public void testDefaultDateTimeFormatValidate ()
9193 throws InvalidArgumentException {
92- final Object [] array = new Object [] { "23-Jan-2003 18:00:00" };
94+ DateFormatSymbols symbols = new DateFormatSymbols ();
95+ final Object [] array = new Object [] { "23-" + symbols .getShortMonths ()[0 ] + "-2003 18:00:00" };
9396 final List list = Arrays .asList (array );
9497 final Validator validator = new DateValidator ( new SimpleDateFormat ("dd-MMM-yyyy HH:mm:ss" ) );
9598
You can’t perform that action at this time.
0 commit comments