You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by bv...@apache.org on 2012/02/06 22:30:46 UTC
svn commit: r1241188 - in /camel/trunk:
camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java
components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java
Author: bvahdat
Date: Mon Feb 6 21:30:46 2012
New Revision: 1241188
URL: http://svn.apache.org/viewvc?rev=1241188&view=rev
Log:
Fixed the test failure on the CI-Server (org.apache.camel.model.ModelSanityCheckerTest), also by BeanIODataFormatComplexTest take the fact into the account that the default Locale could be something else other than Locale.ENGLISH.
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java
camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java
Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java?rev=1241188&r1=1241187&r2=1241188&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java (original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/model/dataformat/BeanioDataFormat.java Mon Feb 6 21:30:46 2012
@@ -68,4 +68,52 @@ public class BeanioDataFormat extends Da
}
}
-}
\ No newline at end of file
+ public String getMapping() {
+ return mapping;
+ }
+
+ public void setMapping(String mapping) {
+ this.mapping = mapping;
+ }
+
+ public String getStreamName() {
+ return streamName;
+ }
+
+ public void setStreamName(String streamName) {
+ this.streamName = streamName;
+ }
+
+ public Boolean getIgnoreUnidentifiedRecords() {
+ return ignoreUnidentifiedRecords;
+ }
+
+ public void setIgnoreUnidentifiedRecords(Boolean ignoreUnidentifiedRecords) {
+ this.ignoreUnidentifiedRecords = ignoreUnidentifiedRecords;
+ }
+
+ public Boolean getIgnoreUnexpectedRecords() {
+ return ignoreUnexpectedRecords;
+ }
+
+ public void setIgnoreUnexpectedRecords(Boolean ignoreUnexpectedRecords) {
+ this.ignoreUnexpectedRecords = ignoreUnexpectedRecords;
+ }
+
+ public Boolean getIgnoreInvalidRecords() {
+ return ignoreInvalidRecords;
+ }
+
+ public void setIgnoreInvalidRecords(Boolean ignoreInvalidRecords) {
+ this.ignoreInvalidRecords = ignoreInvalidRecords;
+ }
+
+ public String getEncoding() {
+ return encoding;
+ }
+
+ public void setEncoding(String encoding) {
+ this.encoding = encoding;
+ }
+
+}
Modified: camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java?rev=1241188&r1=1241187&r2=1241188&view=diff
==============================================================================
--- camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java (original)
+++ camel/trunk/components/camel-beanio/src/test/java/org/apache/camel/dataformat/beanio/BeanIODataFormatComplexTest.java Mon Feb 6 21:30:46 2012
@@ -21,17 +21,24 @@ import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
+import java.util.Locale;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
+
import org.beanio.InvalidRecordException;
import org.beanio.UnexpectedRecordException;
import org.beanio.UnidentifiedRecordException;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
public class BeanIODataFormatComplexTest extends CamelTestSupport {
+ private static Locale defaultLocale;
+
private final String recordData = "0001917A112345.678900 " + LS
+ "0002374A159303290.020 " + LS
+ "0015219B1SECURITY ONE " + LS
@@ -65,6 +72,24 @@ public class BeanIODataFormatComplexTest
+ "HEADER END " + LS
+ recordData;
+ @BeforeClass
+ public static void setLocale() {
+ if (!Locale.getDefault().equals(Locale.ENGLISH)) {
+
+ // the Locale used for the number formatting of the above data is
+ // english which could be other than the default locale
+ defaultLocale = Locale.getDefault();
+ Locale.setDefault(Locale.ENGLISH);
+ }
+ }
+
+ @AfterClass
+ public static void resetLocale() {
+ if (defaultLocale != null) {
+ Locale.setDefault(defaultLocale);
+ }
+ }
+
@Test
public void testMarshal() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:beanio-marshal");