camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bvah...@apache.org
Subject svn commit: r1464888 - in /camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy: classtype/ csv/ fixed/delimited/ fixed/dynamic/ fixed/headerfooter/ fixed/implied/ fixed/marshall/simple/ fixed/number/ fixed/ordinal/ fixed/...
Date Fri, 05 Apr 2013 08:37:43 GMT
Author: bvahdat
Date: Fri Apr  5 08:37:42 2013
New Revision: 1464888

URL: http://svn.apache.org/r1464888
Log:
CAMEL-6241: Fixed the failed tests of camel-bindy in case the language of the JRE default
Locale was something other than english, e.g. "de".

Modified:
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeAsStringTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvGenerateHeaderMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPojoSimpleCsvMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvGenerateHeaderMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallDslTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallPositionModifiedTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvNullMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/delimited/BindyFixedLengthDelimitedFieldTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/dynamic/BindyFixedLengthDynamicFieldTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/headerfooter/BindySimpleFixedLengthHeaderFooterTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/implied/BindyImpliedTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipAndTrimTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/number/BindyNumberTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/ordinal/BindySimpleFixedLengthOrdinalPosTest.java
    camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/skipheader/BindyFixedLengthHeaderFooterSkipHeaderTest.java

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeAsStringTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeAsStringTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeAsStringTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeAsStringTest.java
Fri Apr  5 08:37:42 2013
@@ -22,6 +22,7 @@ import java.util.GregorianCalendar;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.dataformat.bindy.model.simple.oneclass.Order;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
@@ -91,8 +92,13 @@ public class BindyCsvClassTypeAsStringTe
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(org.apache.camel.dataformat.bindy.model.simple.oneclass.Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Csv);
+
                 from("direct:in")
-                    .marshal().bindy(BindyType.Csv, org.apache.camel.dataformat.bindy.model.simple.oneclass.Order.class)
+                    .marshal(bindy)
                     .to("mock:in");
 
                 from("direct:out")

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/classtype/BindyCsvClassTypeTest.java
Fri Apr  5 08:37:42 2013
@@ -22,6 +22,7 @@ import java.util.GregorianCalendar;
 
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.dataformat.bindy.model.simple.oneclass.Order;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
@@ -90,8 +91,13 @@ public class BindyCsvClassTypeTest exten
         return new RouteBuilder() {
             @Override
             public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Csv);
+
                 from("direct:in")
-                    .marshal().bindy(BindyType.Csv, Order.class)
+                    .marshal(bindy)
                     .to("mock:in");
 
                 from("direct:out")

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvGenerateHeaderMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvGenerateHeaderMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvGenerateHeaderMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvGenerateHeaderMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -99,6 +99,8 @@ public class BindyComplexCsvGenerateHead
         public void configure() {
             BindyCsvDataFormat camelDataFormat = 
                 new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.complex.generateheader");
+            camelDataFormat.setLocale("en");
+
             from("direct:start").marshal(camelDataFormat).to("mock:result");
         }
     }

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyComplexCsvMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -100,6 +100,7 @@ public class BindyComplexCsvMarshallTest
         public void configure() {
             BindyCsvDataFormat camelDataFormat = 
                 new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.complex.twoclassesandonelink");
+            camelDataFormat.setLocale("en");
 
             from("direct:start").marshal(camelDataFormat).to("mock:result");
         }

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPojoSimpleCsvMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPojoSimpleCsvMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPojoSimpleCsvMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPojoSimpleCsvMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -87,6 +87,8 @@ public class BindyPojoSimpleCsvMarshallT
         public void configure() {
             BindyCsvDataFormat camelDataFormat = 
                 new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclass");
+            camelDataFormat.setLocale("en");
+
             Tracer tracer = new Tracer();
             tracer.setLogLevel(LoggingLevel.ERROR);
             tracer.setLogName("org.apache.camel.bindy");

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvGenerateHeaderMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvGenerateHeaderMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvGenerateHeaderMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvGenerateHeaderMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -87,6 +87,8 @@ public class BindySimpleCsvGenerateHeade
         public void configure() {
             BindyCsvDataFormat camelDataFormat =
                 new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclassgenerateheader");
+            camelDataFormat.setLocale("en");
+
             from("direct:start").marshal(camelDataFormat).to("mock:result");
         }
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallDslTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallDslTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallDslTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallDslTest.java
Fri Apr  5 08:37:42 2013
@@ -30,6 +30,7 @@ import org.apache.camel.ProducerTemplate
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.model.simple.oneclass.Order;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.junit.Test;
 import org.springframework.test.context.ContextConfiguration;
@@ -85,8 +86,13 @@ public class BindySimpleCsvMarshallDslTe
     public static class ContextConfig extends RouteBuilder {
 
         public void configure() {
+            BindyDataFormat bindy = new BindyDataFormat();
+            bindy.setLocale("en");
+            bindy.setPackages(new String[] {"org.apache.camel.dataformat.bindy.model.simple.oneclass"});
+            bindy.setType(BindyType.Csv);
+
             from("direct:start").
-                marshal().bindy(BindyType.Csv, "org.apache.camel.dataformat.bindy.model.simple.oneclass")
+                marshal(bindy)
                 .to("mock:result");
         }
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallPositionModifiedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallPositionModifiedTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallPositionModifiedTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallPositionModifiedTest.java
Fri Apr  5 08:37:42 2013
@@ -78,8 +78,6 @@ public class BindySimpleCsvMarshallPosit
 
     public static class ContextConfig extends RouteBuilder {
 
-        BindyCsvDataFormat csvBindyDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclassdifferentposition");
-
         public void configure() {
 
             Tracer tracer = new Tracer();
@@ -88,6 +86,9 @@ public class BindySimpleCsvMarshallPosit
 
             getContext().addInterceptStrategy(tracer);
 
+            BindyCsvDataFormat csvBindyDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclassdifferentposition");
+            csvBindyDataFormat.setLocale("en");
+
             // default should errors go to mock:error
             errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -93,7 +93,6 @@ public class BindySimpleCsvMarshallTest 
     }
 
     public static class ContextConfig extends RouteBuilder {
-        BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclass");
 
         public void configure() {
 
@@ -103,6 +102,9 @@ public class BindySimpleCsvMarshallTest 
 
             getContext().addInterceptStrategy(tracer);
 
+            BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclass");
+            camelDataFormat.setLocale("en");
+
             // default should errors go to mock:error
             errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0));
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvNullMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvNullMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvNullMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvNullMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -82,9 +82,11 @@ public class BindySimpleCsvNullMarshallT
     }
 
     public static class ContextConfig extends RouteBuilder {
-        BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclass");
 
         public void configure() {
+            BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.oneclass");
+            camelDataFormat.setLocale("en");
+
             from("direct:start").marshal(camelDataFormat).to("mock:result");
         }
         

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/delimited/BindyFixedLengthDelimitedFieldTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/delimited/BindyFixedLengthDelimitedFieldTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/delimited/BindyFixedLengthDelimitedFieldTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/delimited/BindyFixedLengthDelimitedFieldTest.java
Fri Apr  5 08:37:42 2013
@@ -28,6 +28,7 @@ import org.apache.camel.component.mock.M
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
 
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Assert;
@@ -153,9 +154,14 @@ public class BindyFixedLengthDelimitedFi
         RouteBuilder routeBuilder = new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {      
+            public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(BindyFixedLengthDelimitedFieldTest.Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Fixed);
+
                 from(URI_DIRECT_MARSHALL)
-                    .marshal().bindy(BindyType.Fixed, BindyFixedLengthDelimitedFieldTest.Order.class)
+                    .marshal(bindy)
                     .to(URI_MOCK_MARSHALL_RESULT);
             
                 from(URI_DIRECT_UNMARSHALL)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/dynamic/BindyFixedLengthDynamicFieldTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/dynamic/BindyFixedLengthDynamicFieldTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/dynamic/BindyFixedLengthDynamicFieldTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/dynamic/BindyFixedLengthDynamicFieldTest.java
Fri Apr  5 08:37:42 2013
@@ -28,6 +28,7 @@ import org.apache.camel.component.mock.M
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
 
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Assert;
@@ -125,9 +126,14 @@ public class BindyFixedLengthDynamicFiel
         RouteBuilder routeBuilder = new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {      
+            public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setLocale("en");
+                bindy.setClassType(BindyFixedLengthDynamicFieldTest.Order.class);
+                bindy.setType(BindyType.Fixed);
+
                 from(URI_DIRECT_MARSHALL)
-                    .marshal().bindy(BindyType.Fixed, BindyFixedLengthDynamicFieldTest.Order.class)
+                    .marshal(bindy)
                     .to(URI_MOCK_MARSHALL_RESULT);
             
                 from(URI_DIRECT_UNMARSHALL)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/headerfooter/BindySimpleFixedLengthHeaderFooterTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/headerfooter/BindySimpleFixedLengthHeaderFooterTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/headerfooter/BindySimpleFixedLengthHeaderFooterTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/headerfooter/BindySimpleFixedLengthHeaderFooterTest.java
Fri Apr  5 08:37:42 2013
@@ -31,6 +31,7 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.fixed.BindyFixedLengthDataFormat;
 
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
@@ -207,15 +208,19 @@ public class BindySimpleFixedLengthHeade
         RouteBuilder routeBuilder = new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {      
+            public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Fixed);
+
                 from(URI_DIRECT_MARSHALL)
-                    .marshal().bindy(BindyType.Fixed, Order.class)
+                    .marshal(bindy)
                     .to(URI_MOCK_MARSHALL_RESULT);
             
                 from(URI_DIRECT_UNMARSHALL)
                     .unmarshal().bindy(BindyType.Fixed, Order.class)
                     .to(URI_MOCK_UNMARSHALL_RESULT);
-                
             }
         };
         

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/implied/BindyImpliedTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/implied/BindyImpliedTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/implied/BindyImpliedTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/implied/BindyImpliedTest.java
Fri Apr  5 08:37:42 2013
@@ -26,6 +26,7 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.junit.Assert;
 import org.junit.Test;
@@ -108,8 +109,13 @@ public class BindyImpliedTest extends Ab
 
     public static class ContextConfig extends RouteBuilder {
         public void configure() {
+            BindyDataFormat bindy = new BindyDataFormat();
+            bindy.setClassType(Record.class);
+            bindy.setLocale("en");
+            bindy.setType(BindyType.Fixed);
+
             from(URI_DIRECT_MARSHALL)
-                .marshal().bindy(BindyType.Fixed, Record.class)
+                .marshal(bindy)
                 .to(URI_MOCK_MARSHALL_RESULT);
             from(URI_DIRECT_UNMARSHALL)
                 .unmarshal().bindy(BindyType.Fixed, Record.class)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallTest.java
Fri Apr  5 08:37:42 2013
@@ -33,6 +33,7 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.processor.interceptor.Tracer;
 import org.junit.Test;
@@ -107,8 +108,13 @@ public class BindySimpleFixedLengthMarsh
 
             onException(Exception.class).maximumRedeliveries(0).handled(true);
 
+            BindyDataFormat bindy = new BindyDataFormat();
+            bindy.setLocale("en");
+            bindy.setPackages(new String[] {"org.apache.camel.dataformat.bindy.fixed.marshall.simple"});
+            bindy.setType(BindyType.Fixed);
+
             from(URI_DIRECT_START)
-                    .marshal().bindy(BindyType.Fixed, "org.apache.camel.dataformat.bindy.fixed.marshall.simple")
+                    .marshal(bindy)
                     .to(URI_MOCK_RESULT);
         }
 

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipAndTrimTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipAndTrimTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipAndTrimTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipAndTrimTest.java
Fri Apr  5 08:37:42 2013
@@ -42,6 +42,7 @@ public class BindySimpleFixedLengthMarsh
             @Override
             public void configure() throws Exception {
                 BindyFixedLengthDataFormat bindy = new BindyFixedLengthDataFormat("org.apache.camel.dataformat.bindy.fixed.marshall.simple");
+                bindy.setLocale("en");
 
                 from("direct:start")
                     .marshal(bindy)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/marshall/simple/BindySimpleFixedLengthMarshallWithClipTest.java
Fri Apr  5 08:37:42 2013
@@ -42,6 +42,7 @@ public class BindySimpleFixedLengthMarsh
             @Override
             public void configure() throws Exception {
                 BindyFixedLengthDataFormat bindy = new BindyFixedLengthDataFormat("org.apache.camel.dataformat.bindy.fixed.marshall.simple");
+                bindy.setLocale("en");
 
                 from("direct:start")
                     .marshal(bindy)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/number/BindyNumberTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/number/BindyNumberTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/number/BindyNumberTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/number/BindyNumberTest.java
Fri Apr  5 08:37:42 2013
@@ -26,6 +26,7 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.junit.Assert;
 import org.junit.Test;
@@ -103,8 +104,13 @@ public class BindyNumberTest extends Abs
 
     public static class ContextConfig extends RouteBuilder {
         public void configure() {
+            BindyDataFormat bindy = new BindyDataFormat();
+            bindy.setClassType(DataModel.class);
+            bindy.setLocale("en");
+            bindy.setType(BindyType.Fixed);
+
             from(URI_DIRECT_MARSHALL)
-                .marshal().bindy(BindyType.Fixed, DataModel.class)
+                .marshal(bindy)
                 .to(URI_MOCK_MARSHALL_RESULT);
             from(URI_DIRECT_UNMARSHALL)
                 .unmarshal().bindy(BindyType.Fixed, DataModel.class)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/ordinal/BindySimpleFixedLengthOrdinalPosTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/ordinal/BindySimpleFixedLengthOrdinalPosTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/ordinal/BindySimpleFixedLengthOrdinalPosTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/ordinal/BindySimpleFixedLengthOrdinalPosTest.java
Fri Apr  5 08:37:42 2013
@@ -28,6 +28,7 @@ import org.apache.camel.component.mock.M
 import org.apache.camel.dataformat.bindy.annotation.DataField;
 import org.apache.camel.dataformat.bindy.annotation.FixedLengthRecord;
 
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Assert;
@@ -109,9 +110,14 @@ public class BindySimpleFixedLengthOrdin
         RouteBuilder routeBuilder = new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {      
+            public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(BindySimpleFixedLengthOrdinalPosTest.Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Fixed);
+
                 from(URI_DIRECT_MARSHALL)
-                    .marshal().bindy(BindyType.Fixed, BindySimpleFixedLengthOrdinalPosTest.Order.class)
+                    .marshal(bindy)
                     .to(URI_MOCK_MARSHALL_RESULT);
             
                 from(URI_DIRECT_UNMARSHALL)

Modified: camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/skipheader/BindyFixedLengthHeaderFooterSkipHeaderTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/skipheader/BindyFixedLengthHeaderFooterSkipHeaderTest.java?rev=1464888&r1=1464887&r2=1464888&view=diff
==============================================================================
--- camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/skipheader/BindyFixedLengthHeaderFooterSkipHeaderTest.java
(original)
+++ camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/fixed/skipheader/BindyFixedLengthHeaderFooterSkipHeaderTest.java
Fri Apr  5 08:37:42 2013
@@ -31,6 +31,7 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.fixed.BindyFixedLengthDataFormat;
 
+import org.apache.camel.model.dataformat.BindyDataFormat;
 import org.apache.camel.model.dataformat.BindyType;
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Assert;
@@ -152,9 +153,14 @@ public class BindyFixedLengthHeaderFoote
         RouteBuilder routeBuilder = new RouteBuilder() {
 
             @Override
-            public void configure() throws Exception {      
+            public void configure() throws Exception {
+                BindyDataFormat bindy = new BindyDataFormat();
+                bindy.setClassType(Order.class);
+                bindy.setLocale("en");
+                bindy.setType(BindyType.Fixed);
+
                 from(URI_DIRECT_MARSHALL)
-                    .marshal().bindy(BindyType.Fixed, Order.class)
+                    .marshal(bindy)
                     .to(URI_MOCK_MARSHALL_RESULT);
             
                 from(URI_DIRECT_UNMARSHALL)



Mime
View raw message