camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cschnei...@apache.org
Subject svn commit: r1132961 - /camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
Date Tue, 07 Jun 2011 11:51:21 GMT
Author: cschneider
Date: Tue Jun  7 11:51:21 2011
New Revision: 1132961

URL: http://svn.apache.org/viewvc?rev=1132961&view=rev
Log:
CAMEL-4066 Setting default locale to US to avoid test failure in non English locales

Modified:
    camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java

Modified: camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java?rev=1132961&r1=1132960&r2=1132961&view=diff
==============================================================================
--- camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
(original)
+++ camel/trunk/components/camel-bean-validator/src/test/java/org/apache/camel/component/bean/validator/BeanValidatorRouteTest.java
Tue Jun  7 11:51:21 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.camel.component.bean.validator;
 
+import java.util.Locale;
 import java.util.Set;
 
 import javax.validation.ConstraintViolation;
@@ -24,12 +25,26 @@ import org.apache.camel.CamelExecutionEx
 import org.apache.camel.Exchange;
 import org.apache.camel.Processor;
 import org.apache.camel.test.junit4.CamelTestSupport;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 
 /**
  * @version 
  */
 public class BeanValidatorRouteTest extends CamelTestSupport {
+	private Locale origLocale;
+
+	@Before
+	public void setLanguage() {
+		origLocale = Locale.getDefault();
+		Locale.setDefault(Locale.US);
+	}
+	
+	@After
+	public void restoreLanguage() {
+		Locale.setDefault(origLocale);
+	}
     
     @Test
     public void validateShouldSuccessWithImpliciteDefaultGroup() throws Exception {



Mime
View raw message