Improvement Camel-7724 camel-bindy - Add support for boolean data type formatter
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/6c66ed40 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6c66ed40 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6c66ed40 Branch: refs/heads/master Commit: 6c66ed409dcfb50bfcbc1a696a1852ad6d044e96 Parents: b0c572f Author: ancosen <anco...@gmail.com> Authored: Thu Aug 21 23:37:15 2014 +0200 Committer: ancosen <anco...@gmail.com> Committed: Thu Aug 21 23:37:15 2014 +0200 ---------------------------------------------------------------------- .../camel/dataformat/bindy/FormatFactory.java | 3 + .../dataformat/bindy/format/BooleanFormat.java | 31 +++++ .../BindySimpleCsvBooleanFalseMarshallTest.java | 84 ++++++++++++ .../BindySimpleCsvBooleanTrueMarshallTest.java | 84 ++++++++++++ .../BindySimpleCsvBooleanUnmarshallTest.java | 130 +++++++++++++++++++ .../bindy/model/simple/bool/BooleanExample.java | 51 ++++++++ ...impleCsvBooleanFalseMarshallTest-context.xml | 32 +++++ ...SimpleCsvBooleanTrueMarshallTest-context.xml | 32 +++++ ...dySimpleCsvBooleanUnmarshallTest-context.xml | 32 +++++ 9 files changed, 479 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java index 9f11926..d5dc68b 100755 --- a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java +++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/FormatFactory.java @@ -26,6 +26,7 @@ import org.apache.camel.dataformat.bindy.annotation.DataField; import org.apache.camel.dataformat.bindy.annotation.KeyValuePairField; import org.apache.camel.dataformat.bindy.format.BigDecimalFormat; import org.apache.camel.dataformat.bindy.format.BigIntegerFormat; +import org.apache.camel.dataformat.bindy.format.BooleanFormat; import org.apache.camel.dataformat.bindy.format.ByteFormat; import org.apache.camel.dataformat.bindy.format.BytePatternFormat; import org.apache.camel.dataformat.bindy.format.CharacterFormat; @@ -102,6 +103,8 @@ public final class FormatFactory { return new DatePatternFormat(pattern, timezone, getLocale(locale)); } else if (clazz == char.class || clazz == Character.class) { return new CharacterFormat(); + } else if (clazz == boolean.class || clazz == Boolean.class) { + return new BooleanFormat(); } else if (clazz.isEnum()) { return new EnumFormat(clazz); } else { http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BooleanFormat.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BooleanFormat.java b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BooleanFormat.java new file mode 100755 index 0000000..d94596e --- /dev/null +++ b/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/format/BooleanFormat.java @@ -0,0 +1,31 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.dataformat.bindy.format; + +import org.apache.camel.dataformat.bindy.Format; + +public class BooleanFormat implements Format<Boolean> { + + public String format(Boolean object) throws Exception { + return object.toString(); + } + + public Boolean parse(String string) throws Exception { + return new Boolean(string); + } + +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest.java new file mode 100644 index 0000000..18d649c --- /dev/null +++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest.java @@ -0,0 +1,84 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.dataformat.bindy.csv; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Produce; +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.bool.BooleanExample; +import org.junit.Test; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; + +@ContextConfiguration +public class BindySimpleCsvBooleanFalseMarshallTest extends AbstractJUnit4SpringContextTests { + + private List<Map<String, Object>> models = new ArrayList<Map<String, Object>>(); + private String result = "andrew,false\r\n"; + + @Produce(uri = "direct:start") + private ProducerTemplate template; + + @EndpointInject(uri = "mock:result") + private MockEndpoint resultEndpoint; + + @Test + public void testMarshallMessage() throws Exception { + resultEndpoint.expectedBodiesReceived(result); + + template.sendBody(generateModel()); + + resultEndpoint.assertIsSatisfied(); + } + + + public List<Map<String, Object>> generateModel() { + Map<String, Object> modelObjects = new HashMap<String, Object>(); + + List<BooleanExample> list = new ArrayList<BooleanExample>(); + + BooleanExample example = new BooleanExample(); + + example.setName("andrew"); + example.setExist(Boolean.FALSE); + + modelObjects.put(example.getClass().getName(), example); + + models.add(modelObjects); + + return models; + } + + public static class ContextConfig extends RouteBuilder { + + public void configure() { + BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.bool"); + camelDataFormat.setLocale("en"); + + from("direct:start").marshal(camelDataFormat).to("mock:result"); + } + + } + +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest.java new file mode 100644 index 0000000..a707253 --- /dev/null +++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest.java @@ -0,0 +1,84 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.dataformat.bindy.csv; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.camel.EndpointInject; +import org.apache.camel.Produce; +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.bool.BooleanExample; +import org.junit.Test; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; + +@ContextConfiguration +public class BindySimpleCsvBooleanTrueMarshallTest extends AbstractJUnit4SpringContextTests { + + private List<Map<String, Object>> models = new ArrayList<Map<String, Object>>(); + private String result = "andrew,true\r\n"; + + @Produce(uri = "direct:start") + private ProducerTemplate template; + + @EndpointInject(uri = "mock:result") + private MockEndpoint resultEndpoint; + + @Test + public void testMarshallMessage() throws Exception { + resultEndpoint.expectedBodiesReceived(result); + + template.sendBody(generateModel()); + + resultEndpoint.assertIsSatisfied(); + } + + + public List<Map<String, Object>> generateModel() { + Map<String, Object> modelObjects = new HashMap<String, Object>(); + + List<BooleanExample> list = new ArrayList<BooleanExample>(); + + BooleanExample example = new BooleanExample(); + + example.setName("andrew"); + example.setExist(Boolean.TRUE); + + modelObjects.put(example.getClass().getName(), example); + + models.add(modelObjects); + + return models; + } + + public static class ContextConfig extends RouteBuilder { + + public void configure() { + BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.bool"); + camelDataFormat.setLocale("en"); + + from("direct:start").marshal(camelDataFormat).to("mock:result"); + } + + } + +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest.java new file mode 100755 index 0000000..44ad4a1 --- /dev/null +++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest.java @@ -0,0 +1,130 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.dataformat.bindy.csv; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.List; +import java.util.Map; + +import org.apache.camel.EndpointInject; +import org.apache.camel.LoggingLevel; +import org.apache.camel.Produce; +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.bool.BooleanExample; +import org.apache.camel.processor.interceptor.Tracer; +import org.junit.Test; +import org.springframework.test.annotation.DirtiesContext; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests; + +@ContextConfiguration +public class BindySimpleCsvBooleanUnmarshallTest extends AbstractJUnit4SpringContextTests { + + private static final String URI_MOCK_RESULT = "mock:result"; + private static final String URI_MOCK_ERROR = "mock:error"; + private static final String URI_DIRECT_START = "direct:start"; + + @Produce(uri = URI_DIRECT_START) + private ProducerTemplate template; + + @EndpointInject(uri = URI_MOCK_RESULT) + private MockEndpoint result; + + @EndpointInject(uri = URI_MOCK_ERROR) + private MockEndpoint error; + + private String expected; + + @SuppressWarnings("unchecked") + @Test + @DirtiesContext + public void testUnMarshallMessageWithBoolean() throws Exception { + + // We suppress the firstName field of the first record + expected = "andrew,true\r\n" + "andrew,false\r\n"; + + template.sendBody(expected); + + List<Map<String, BooleanExample>> examples = (List<Map<String, BooleanExample>>) result.getExchanges().get(0).getIn().getBody(); + + result.expectedMessageCount(1); + result.assertIsSatisfied(); + + assertFalse(examples.get(0).get(BooleanExample.class.getName()).getName().isEmpty()); + assertEquals(examples.get(0).get(BooleanExample.class.getName()).getName(), "andrew"); + assertTrue(examples.get(0).get(BooleanExample.class.getName()).getExist()); + assertFalse(examples.get(1).get(BooleanExample.class.getName()).getName().isEmpty()); + assertEquals(examples.get(1).get(BooleanExample.class.getName()).getName(), "andrew"); + assertFalse(examples.get(1).get(BooleanExample.class.getName()).getExist()); + assertNotNull(examples); + } + + @SuppressWarnings("unchecked") + @Test + @DirtiesContext + public void testUnMarshallMessageWithBooleanMissingFields() throws Exception { + + // We suppress the firstName field of the first record + expected = "andrew,true\r\n" + "joseph,false\r\n" + "nicholas,\r\n"; + + template.sendBody(expected); + + List<Map<String, BooleanExample>> examples = (List<Map<String, BooleanExample>>) result.getExchanges().get(0).getIn().getBody(); + + result.expectedMessageCount(1); + result.assertIsSatisfied(); + + assertFalse(examples.get(0).get(BooleanExample.class.getName()).getName().isEmpty()); + assertEquals(examples.get(0).get(BooleanExample.class.getName()).getName(), "andrew"); + assertTrue(examples.get(0).get(BooleanExample.class.getName()).getExist()); + assertFalse(examples.get(1).get(BooleanExample.class.getName()).getName().isEmpty()); + assertEquals(examples.get(1).get(BooleanExample.class.getName()).getName(), "joseph"); + assertFalse(examples.get(1).get(BooleanExample.class.getName()).getExist()); + assertFalse(examples.get(2).get(BooleanExample.class.getName()).getName().isEmpty()); + assertEquals(examples.get(2).get(BooleanExample.class.getName()).getName(), "nicholas"); + assertTrue(examples.get(2).get(BooleanExample.class.getName()).getExist()); + assertNotNull(examples); + } + + public static class ContextConfig extends RouteBuilder { + BindyCsvDataFormat camelDataFormat = new BindyCsvDataFormat("org.apache.camel.dataformat.bindy.model.simple.bool"); + + public void configure() { + // from("file://src/test/data?move=./target/done").unmarshal(camelDataFormat).to("mock:result"); + + Tracer tracer = new Tracer(); + tracer.setLogLevel(LoggingLevel.ERROR); + tracer.setLogName("org.apache.camel.bindy"); + + getContext().addInterceptStrategy(tracer); + + // default should errors go to mock:error + errorHandler(deadLetterChannel(URI_MOCK_ERROR).redeliveryDelay(0)); + + onException(Exception.class).maximumRedeliveries(0).handled(true); + + from(URI_DIRECT_START).unmarshal(camelDataFormat).to(URI_MOCK_RESULT); + } + + } +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/bool/BooleanExample.java ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/bool/BooleanExample.java b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/bool/BooleanExample.java new file mode 100644 index 0000000..7378a01 --- /dev/null +++ b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/bool/BooleanExample.java @@ -0,0 +1,51 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.dataformat.bindy.model.simple.bool; + +import org.apache.camel.dataformat.bindy.annotation.CsvRecord; +import org.apache.camel.dataformat.bindy.annotation.DataField; + +@CsvRecord(separator = ",") +public class BooleanExample { + @DataField(pos = 1) + public String name; + + @DataField(pos = 2, defaultValue = "true") + public Boolean exist; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public Boolean getExist() { + return exist; + } + + public void setExist(Boolean exist) { + this.exist = exist; + } + + @Override + public String toString() { + return "BoolExample [name=" + name + ", exist=" + exist + "]"; + } + +} http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest-context.xml ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest-context.xml b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest-context.xml new file mode 100644 index 0000000..6692f2a --- /dev/null +++ b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanFalseMarshallTest-context.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring + http://camel.apache.org/schema/spring/camel-spring.xsd"> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <routeBuilder ref="myBuilder" /> + </camelContext> + + <bean id="myBuilder" class="org.apache.camel.dataformat.bindy.csv.BindySimpleCsvBooleanFalseMarshallTest$ContextConfig"/> + +</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest-context.xml ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest-context.xml b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest-context.xml new file mode 100644 index 0000000..d9ece2a --- /dev/null +++ b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanTrueMarshallTest-context.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring + http://camel.apache.org/schema/spring/camel-spring.xsd"> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <routeBuilder ref="myBuilder" /> + </camelContext> + + <bean id="myBuilder" class="org.apache.camel.dataformat.bindy.csv.BindySimpleCsvBooleanTrueMarshallTest$ContextConfig"/> + +</beans> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/6c66ed40/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest-context.xml ---------------------------------------------------------------------- diff --git a/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest-context.xml b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest-context.xml new file mode 100644 index 0000000..d6f3412 --- /dev/null +++ b/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySimpleCsvBooleanUnmarshallTest-context.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> +<beans xmlns="http://www.springframework.org/schema/beans" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation=" + http://www.springframework.org/schema/beans + http://www.springframework.org/schema/beans/spring-beans.xsd + http://camel.apache.org/schema/spring + http://camel.apache.org/schema/spring/camel-spring.xsd"> + + <camelContext xmlns="http://camel.apache.org/schema/spring"> + <routeBuilder ref="myBuilder" /> + </camelContext> + + <bean id="myBuilder" class="org.apache.camel.dataformat.bindy.csv.BindySimpleCsvBooleanUnmarshallTest$ContextConfig"/> + +</beans> \ No newline at end of file