Author: davsclaus
Date: Wed Jan  5 09:29:12 2011
New Revision: 1055373

URL: http://svn.apache.org/viewvc?rev=1055373&view=rev
Log:
CAMEL-3489: Fixed bindy when using quoted csv records, now it will unquote each 
token properly. Fixed issue with using pipeline as delimiter as well.

Added:
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest.java
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPipeDelimiterTest.java
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest.java
      - copied, changed from r1055343, 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/MyData.java
    
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest-context.xml
    
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest-context.xml
      - copied, changed from r1055343, 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest-context.xml
Modified:
    
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java
    
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java

Modified: 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java?rev=1055373&r1=1055372&r2=1055373&view=diff
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java
 (original)
+++ 
camel/trunk/components/camel-bindy/src/main/java/org/apache/camel/dataformat/bindy/csv/BindyCsvDataFormat.java
 Wed Jan  5 09:29:12 2011
@@ -149,21 +149,12 @@ public class BindyCsvDataFormat extends 
                 // Create POJO where CSV data will be stored
                 model = factory.factory();
                 
-                // Added for camel- jira ticket
-                // We will remove the first and last character  of the line
-                // when the separator contains quotes, double quotes 
-                // e.g. ',' or "," ...
-                // REMARK : We take the assumption that the data fields are
-                // quoted or double quoted like that 
-                // e.g : "1 ", "street 1, NY", "USA"
-                if (separator.length() > 1) {
-                    String tempLine = line.substring(1, line.length() - 1);
-                    line = tempLine;
-                }
                 // Split the CSV record according to the separator defined in
                 // annotated class @CSVRecord
                 String[] tokens = line.split(separator, -1);
                 List<String> result = Arrays.asList(tokens);
+                // must unquote tokens before use
+                result = unquoteTokens(result);
 
                 if (result.size() == 0 || result.isEmpty()) {
                     throw new java.lang.IllegalArgumentException("No records 
have been defined in the CSV !");
@@ -207,6 +198,23 @@ public class BindyCsvDataFormat extends 
 
     }
 
+    /**
+     * Unquote the tokens, by removing leading and trailing quote chars
+     */
+    private List<String> unquoteTokens(List<String> result) {
+        List<String> answer = new ArrayList<String>(result.size());
+        for (String s : result) {
+            if (s.startsWith("\"") || s.startsWith("'")) {
+                s = s.substring(1);
+            }
+            if (s.endsWith("\"") || s.endsWith("'")) {
+                s = s.substring(0, s.length() - 1);
+            }
+            answer.add(s);
+        }
+        return answer;
+    }
+
     protected BindyAbstractFactory createModelFactory(PackageScanClassResolver 
resolver) throws Exception {
         return new BindyCsvFactory(resolver, getPackages());
     }

Modified: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java?rev=1055373&r1=1055372&r2=1055373&view=diff
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
 (original)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
 Wed Jan  5 09:29:12 2011
@@ -26,7 +26,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
 import org.apache.camel.dataformat.bindy.annotation.DataField;
-import org.apache.camel.test.junit4.TestSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.Test;
@@ -34,8 +33,6 @@ import org.springframework.test.annotati
 import org.springframework.test.context.ContextConfiguration;
 import 
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-import static org.junit.Assert.assertEquals;
-
 @ContextConfiguration
 public class BindyDoubleQuotesCsvUnmarshallTest extends 
AbstractJUnit4SpringContextTests {
 
@@ -77,7 +74,7 @@ public class BindyDoubleQuotesCsvUnmarsh
 
     }
     
-    @CsvRecord(separator = "\",\"")
+    @CsvRecord(separator = ",")
     public static class Order {
 
         @DataField(pos = 1)

Added: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest.java?rev=1055373&view=auto
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest.java
 (added)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest.java
 Wed Jan  5 09:29:12 2011
@@ -0,0 +1,82 @@
+/**
+ * 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.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.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.junit.Assert;
+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 BindyInlinedQuotesCsvUnmarshallTest extends 
AbstractJUnit4SpringContextTests {
+
+    private static final transient Log LOG = 
LogFactory.getLog(BindyInlinedQuotesCsvUnmarshallTest.class);
+
+    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;
+
+    @Test
+    @DirtiesContext
+    public void testUnMarshallMessage() throws Exception {
+
+        expected = 
"10,A9,'Pauline','O'Donald',ISIN,XD12345678,BUY,Share,2500.45,USD,08-01-2009";
+
+        template.sendBody(expected);
+
+        result.expectedMessageCount(1);
+        result.assertIsSatisfied();
+
+        Map map = (Map) 
result.getReceivedExchanges().get(0).getIn().getBody(List.class).get(0);
+        BindyDoubleQuotesCsvUnmarshallTest.Order order = 
(BindyDoubleQuotesCsvUnmarshallTest.Order) map.values().iterator().next();
+        Assert.assertEquals(10, order.getOrderNr());
+        Assert.assertEquals("Pauline", order.getFirstName());
+        Assert.assertEquals("O'Donald", order.getLastName());
+    }
+
+    public static class ContextConfig extends RouteBuilder {
+        BindyCsvDataFormat camelDataFormat = new 
BindyCsvDataFormat("org.apache.camel.dataformat.bindy.csv");
+
+        public void configure() {
+            
from(URI_DIRECT_START).unmarshal(camelDataFormat).to(URI_MOCK_RESULT);
+        }
+
+    }
+
+}

Added: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPipeDelimiterTest.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPipeDelimiterTest.java?rev=1055373&view=auto
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPipeDelimiterTest.java
 (added)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyPipeDelimiterTest.java
 Wed Jan  5 09:29:12 2011
@@ -0,0 +1,70 @@
+/**
+ * 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.List;
+import java.util.Map;
+
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.dataformat.bindy.model.simple.pipeline.MyData;
+import org.apache.camel.model.dataformat.BindyType;
+import org.apache.camel.test.CamelTestSupport;
+import org.junit.Test;
+
+/**
+ * @version $Revision$
+ */
+public class BindyPipeDelimiterTest extends CamelTestSupport {
+
+    @Test
+    public void testBindyPipeDelimiter() throws Exception {
+        MockEndpoint mock = getMockEndpoint("mock:result");
+        mock.expectedMessageCount(1);
+
+        template.sendBody("direct:start", "COL1|COL2|COL3\nHAPPY | NEW | 
YEAR");
+
+        assertMockEndpointsSatisfied();
+
+        Map map1 = (Map) 
mock.getReceivedExchanges().get(0).getIn().getBody(List.class).get(0);
+        Map map2 = (Map) 
mock.getReceivedExchanges().get(0).getIn().getBody(List.class).get(1);
+
+        MyData rec1 = (MyData) map1.values().iterator().next();
+        MyData rec2 = (MyData) map2.values().iterator().next();
+
+        assertEquals("COL1", rec1.getCol1());
+        assertEquals("COL2", rec1.getCol2());
+        assertEquals("COL3", rec1.getCol3());
+
+        assertEquals("HAPPY ", rec2.getCol1());
+        assertEquals(" NEW ", rec2.getCol2());
+        assertEquals(" YEAR", rec2.getCol3());
+    }
+
+    @Override
+    protected RouteBuilder createRouteBuilder() throws Exception {
+        return new RouteBuilder() {
+            @Override
+            public void configure() throws Exception {
+                from("direct:start")
+                    .unmarshal().bindy(BindyType.Csv, 
"org.apache.camel.dataformat.bindy.model.simple.pipeline")
+                    .to("mock:result");
+            }
+        };
+    }
+
+}

Copied: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest.java
 (from r1055343, 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java)
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest.java?p2=camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest.java&p1=camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java&r1=1055343&r2=1055373&rev=1055373&view=diff
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest.java
 (original)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest.java
 Wed Jan  5 09:29:12 2011
@@ -16,17 +16,11 @@
  */
 package org.apache.camel.dataformat.bindy.csv;
 
-import java.math.BigDecimal;
-import java.util.Date;
-
 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.annotation.CsvRecord;
-import org.apache.camel.dataformat.bindy.annotation.DataField;
-import org.apache.camel.test.junit4.TestSupport;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 import org.junit.Test;
@@ -34,12 +28,10 @@ import org.springframework.test.annotati
 import org.springframework.test.context.ContextConfiguration;
 import 
org.springframework.test.context.junit4.AbstractJUnit4SpringContextTests;
 
-import static org.junit.Assert.assertEquals;
-
 @ContextConfiguration
-public class BindyDoubleQuotesCsvUnmarshallTest extends 
AbstractJUnit4SpringContextTests {
+public class BindySingleQuotesCsvUnmarshallTest extends 
AbstractJUnit4SpringContextTests {
 
-    private static final transient Log LOG = 
LogFactory.getLog(BindyDoubleQuotesCsvUnmarshallTest.class);
+    private static final transient Log LOG = 
LogFactory.getLog(BindySingleQuotesCsvUnmarshallTest.class);
 
     private static final String URI_MOCK_RESULT = "mock:result";
     private static final String URI_MOCK_ERROR = "mock:error";
@@ -60,7 +52,7 @@ public class BindyDoubleQuotesCsvUnmarsh
     @DirtiesContext
     public void testUnMarshallMessage() throws Exception {
 
-        expected = 
"\"10\",\"A9\",\"Pauline\",\"M\",\"ISIN\",\"XD12345678\",\"BUY\",\"Share\",\"2500.45\",\"USD,08-01-2009\"";
+        expected = 
"'10','A9','Pauline','M','ISIN','XD12345678','BUY,Share','2500.45','USD','08-01-2009";
 
         template.sendBody(expected);
 
@@ -76,137 +68,5 @@ public class BindyDoubleQuotesCsvUnmarsh
         }
 
     }
-    
-    @CsvRecord(separator = "\",\"")
-    public static class Order {
-
-        @DataField(pos = 1)
-        private int orderNr;
-
-        @DataField(pos = 2)
-        private String clientNr;
-
-        @DataField(pos = 3)
-        private String firstName;
-
-        @DataField(pos = 4)
-        private String lastName;
-
-        @DataField(pos = 5)
-        private String instrumentCode;
-
-        @DataField(pos = 6)
-        private String instrumentNumber;
-
-        @DataField(pos = 7)
-        private String orderType;
-
-        @DataField(name = "Name", pos = 8)
-        private String instrumentType;
-
-        @DataField(pos = 9, precision = 2)
-        private BigDecimal amount;
-
-        @DataField(pos = 10)
-        private String currency;
-
-        @DataField(pos = 11, pattern = "dd-MM-yyyy")
-        private Date orderDate;
-
-        public int getOrderNr() {
-            return orderNr;
-        }
-
-        public void setOrderNr(int orderNr) {
-            this.orderNr = orderNr;
-        }
-
-        public String getClientNr() {
-            return clientNr;
-        }
-
-        public void setClientNr(String clientNr) {
-            this.clientNr = clientNr;
-        }
-
-        public String getFirstName() {
-            return firstName;
-        }
-
-        public void setFirstName(String firstName) {
-            this.firstName = firstName;
-        }
-
-        public String getLastName() {
-            return lastName;
-        }
-
-        public void setLastName(String lastName) {
-            this.lastName = lastName;
-        }
-
-        public String getInstrumentCode() {
-            return instrumentCode;
-        }
-
-        public void setInstrumentCode(String instrumentCode) {
-            this.instrumentCode = instrumentCode;
-        }
-
-        public String getInstrumentNumber() {
-            return instrumentNumber;
-        }
-
-        public void setInstrumentNumber(String instrumentNumber) {
-            this.instrumentNumber = instrumentNumber;
-        }
-
-        public String getOrderType() {
-            return orderType;
-        }
-
-        public void setOrderType(String orderType) {
-            this.orderType = orderType;
-        }
-
-        public String getInstrumentType() {
-            return instrumentType;
-        }
-
-        public void setInstrumentType(String instrumentType) {
-            this.instrumentType = instrumentType;
-        }
-
-        public BigDecimal getAmount() {
-            return amount;
-        }
-
-        public void setAmount(BigDecimal amount) {
-            this.amount = amount;
-        }
-
-        public String getCurrency() {
-            return currency;
-        }
-
-        public void setCurrency(String currency) {
-            this.currency = currency;
-        }
-
-        public Date getOrderDate() {
-            return orderDate;
-        }
-
-        public void setOrderDate(Date orderDate) {
-            this.orderDate = orderDate;
-        }
-
-        @Override
-        public String toString() {
-            return "Model : " + Order.class.getName() + " : " + this.orderNr + 
", " + this.orderType + ", " + String.valueOf(this.amount) + ", " + 
this.instrumentCode + ", "
-                   + this.instrumentNumber + ", " + this.instrumentType + ", " 
+ this.currency + ", " + this.clientNr + ", " + this.firstName + ", " + 
this.lastName + ", "
-                   + String.valueOf(this.orderDate);
-        }
-    }
 
 }

Added: 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/MyData.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/MyData.java?rev=1055373&view=auto
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/MyData.java
 (added)
+++ 
camel/trunk/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/simple/pipeline/MyData.java
 Wed Jan  5 09:29:12 2011
@@ -0,0 +1,61 @@
+/**
+ * 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.pipeline;
+
+import org.apache.camel.dataformat.bindy.annotation.CsvRecord;
+import org.apache.camel.dataformat.bindy.annotation.DataField;
+
+/**
+ * @version $Revision$
+ */
+...@csvrecord(separator = "\\|")
+public class MyData {
+
+    @DataField(pos = 1)
+    private String col1;
+
+    @DataField(pos = 2)
+    private String col2;
+
+    @DataField(pos = 3)
+    private String col3;
+
+    public String getCol1() {
+        return col1;
+    }
+
+    public void setCol1(String col1) {
+        this.col1 = col1;
+    }
+
+    public String getCol2() {
+        return col2;
+    }
+
+    public void setCol2(String col2) {
+        this.col2 = col2;
+    }
+
+    public String getCol3() {
+        return col3;
+    }
+
+    public void setCol3(String col3) {
+        this.col3 = col3;
+    }
+
+}

Added: 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest-context.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest-context.xml?rev=1055373&view=auto
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest-context.xml
 (added)
+++ 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyInlinedQuotesCsvUnmarshallTest-context.xml
 Wed Jan  5 09:29:12 2011
@@ -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.BindyInlinedQuotesCsvUnmarshallTest$ContextConfig"/>
+       
+</beans>
\ No newline at end of file

Copied: 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest-context.xml
 (from r1055343, 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest-context.xml)
URL: 
http://svn.apache.org/viewvc/camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest-context.xml?p2=camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest-context.xml&p1=camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest-context.xml&r1=1055343&r2=1055373&rev=1055373&view=diff
==============================================================================
--- 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindyDoubleQuotesCsvUnmarshallTest-context.xml
 (original)
+++ 
camel/trunk/components/camel-bindy/src/test/resources/org/apache/camel/dataformat/bindy/csv/BindySingleQuotesCsvUnmarshallTest-context.xml
 Wed Jan  5 09:29:12 2011
@@ -27,6 +27,6 @@
                <routeBuilder ref="myBuilder" /> 
        </camelContext>
        
-       <bean id="myBuilder" 
class="org.apache.camel.dataformat.bindy.csv.BindyDoubleQuotesCsvUnmarshallTest$ContextConfig"/>
+       <bean id="myBuilder" 
class="org.apache.camel.dataformat.bindy.csv.BindySingleQuotesCsvUnmarshallTest$ContextConfig"/>
        
 </beans>
\ No newline at end of file


Reply via email to