Author: lfryc(a)redhat.com
Date: 2009-10-08 15:40:39 -0400 (Thu, 08 Oct 2009)
New Revision: 15706
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java
Log:
- CalendarTestCase - fixed checking for right name of month in non-default locale
Modified:
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java
===================================================================
---
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java 2009-10-08
15:13:47 UTC (rev 15705)
+++
branches/community/3.3.X/samples/richfaces-demo/functional-test/src/test/java/org/jboss/richfaces/integrationTest/calendar/CalendarTestCase.java 2009-10-08
19:40:39 UTC (rev 15706)
@@ -26,7 +26,9 @@
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
+import java.text.SimpleDateFormat;
import java.util.Calendar;
+import java.util.Date;
import java.util.Locale;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
@@ -272,7 +274,7 @@
selenium.click(LOC_DATE_BUTTON);
selenium.click(LOC_RANDOM_DAY);
- String month1 = Month.values()[Calendar.getInstance(new
Locale("de")).get(Calendar.MONTH)].toString();
+ String month1 = new SimpleDateFormat("MMMMM", new
Locale("de")).format(new Date());
String month2 =
selenium.getText(LOC_MONTH_YEAR_LABEL).split(",")[0].trim();
assertTrue(month1.equalsIgnoreCase(month2), "The name of the month is not
localized.");
Show replies by thread