http://git-wip-us.apache.org/repos/asf/camel/blob/311d429c/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/format/factories/BigDecimalFormatFactoryTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/format/factories/BigDecimalFormatFactoryTest.java
 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/format/factories/BigDecimalFormatFactoryTest.java
new file mode 100644
index 0000000..5dbdeb4
--- /dev/null
+++ 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/format/factories/BigDecimalFormatFactoryTest.java
@@ -0,0 +1,48 @@
+/**
+ * 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.factories;
+
+import java.math.BigDecimal;
+import org.apache.camel.dataformat.bindy.FormattingOptions;
+import org.junit.Test;
+
+import static org.hamcrest.core.Is.is;
+import static org.junit.Assert.*;
+
+public class BigDecimalFormatFactoryTest {
+
+    private FormattingOptions formattingOptions = new FormattingOptions()
+            .forClazz(BigDecimal.class);
+    private FormattingOptions wrongClass = new FormattingOptions()
+            .forClazz(Integer.class);
+    private FormattingOptions hasPattern = new FormattingOptions()
+            .forClazz(BigDecimal.class)
+            .withPattern("999.99");
+
+    @Test
+    public void canBuild() throws Exception {
+        assertThat(new BigDecimalFormatFactory().canBuild(formattingOptions), 
is(true));
+        assertThat(new BigDecimalFormatFactory().canBuild(wrongClass), 
is(false));
+        assertThat(new BigDecimalFormatFactory().canBuild(hasPattern), 
is(false));
+    }
+
+    @Test
+    public void build() throws Exception {
+
+    }
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/camel/blob/311d429c/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java
----------------------------------------------------------------------
diff --git 
a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java
 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java
index 04f1857..b3dc526 100644
--- 
a/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java
+++ 
b/components/camel-bindy/src/test/java/org/apache/camel/dataformat/bindy/model/date/BindyDatePatternCsvUnmarshallTest.java
@@ -51,7 +51,7 @@ public class BindyDatePatternCsvUnmarshallTest extends 
AbstractJUnit4SpringConte
     @Test
     @DirtiesContext
     public void testUnMarshallMessage() throws Exception {
-        expected = "10,Christian,Mueller,12-24-2013,12-26-2015,01-06-2016 
12:14:49,13:15:01";
+        expected = "10,Christian,Mueller,12-24-2013,12-26-2015,01-06-2016 
12:14:49,13:15:01,broken";
 
         result.expectedBodiesReceived(expected + "\r\n");
 
@@ -97,6 +97,9 @@ public class BindyDatePatternCsvUnmarshallTest extends 
AbstractJUnit4SpringConte
         @DataField(pos = 7, pattern = "HH:mm:ss")
         private LocalTime receivedTime;
 
+        @DataField(pos = 8)
+        private ReturnReason returnReason;
+
         public int getOrderNr() {
             return orderNr;
         }
@@ -157,5 +160,18 @@ public class BindyDatePatternCsvUnmarshallTest extends 
AbstractJUnit4SpringConte
         public void setReceivedTime(LocalTime receivedTime) {
             this.receivedTime = receivedTime;
         }
+
+        public ReturnReason getReturnReason() {
+            return returnReason;
+        }
+
+        public void setReturnReason(ReturnReason returnReason) {
+            this.returnReason = returnReason;
+        }
+    }
+
+    public enum ReturnReason {
+        broken,
+        other
     }
 }

Reply via email to