click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r929502 - /click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java
Date Wed, 31 Mar 2010 12:29:41 GMT
Author: sabob
Date: Wed Mar 31 12:29:41 2010
New Revision: 929502

URL: http://svn.apache.org/viewvc?rev=929502&view=rev
Log:
restore default locale in tests

Modified:
    click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java

Modified: click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java?rev=929502&r1=929501&r2=929502&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/util/MessagesMapTest.java Wed Mar 31
12:29:41 2010
@@ -178,6 +178,8 @@ public class MessagesMapTest extends Tes
      * CLK-269
      */
     public void testBasePropertiesUsingNonExistentDefaultLocale() {
+        Locale defaultLocale = Locale.getDefault();
+
         Locale locale = new Locale("xx", "XX");//bogus locale
 
         //Set bogus as the default locale
@@ -199,6 +201,9 @@ public class MessagesMapTest extends Tes
           "click-control");
         assertFalse(englishMessages.isEmpty());
         assertEquals("First", englishMessages.get("table-first-label"));
+
+        // Restore default locale
+        Locale.setDefault(defaultLocale);
     }
 
     /**
@@ -208,6 +213,8 @@ public class MessagesMapTest extends Tes
      * CLK-269
      */
     public void testEnglishMessagesUsingFrenchDefaultLocale() {
+        Locale defaultLocale = Locale.getDefault();
+
         Locale locale = new Locale("fr", "FR");
 
         //Set French as default locale
@@ -228,6 +235,9 @@ public class MessagesMapTest extends Tes
           "click-control");
         assertFalse(englishMessages.isEmpty());
         assertEquals("First", englishMessages.get("table-first-label"));
+
+        // Restore default locale
+        Locale.setDefault(defaultLocale);
     }
 
     /**



Mime
View raw message