Repository: incubator-tamaya
Updated Branches:
  refs/heads/master a5420d61e -> 1b413201e


Added a unit test.


Project: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/commit/1b413201
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/tree/1b413201
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tamaya/diff/1b413201

Branch: refs/heads/master
Commit: 1b413201e6af10c807db31a1bb60e1ca79e898a7
Parents: 8130dd0
Author: Oliver B. Fischer <ple...@apache.org>
Authored: Thu Mar 5 22:39:22 2015 +0100
Committer: Oliver B. Fischer <ple...@apache.org>
Committed: Thu Mar 5 19:19:49 2015 +0100

----------------------------------------------------------------------
 .../converters/LocalDateConverterTest.java      | 41 ++++++++++++++++++++
 1 file changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tamaya/blob/1b413201/java8/core/src/test/java/org/apache/tamaya/core/internal/converters/LocalDateConverterTest.java
----------------------------------------------------------------------
diff --git 
a/java8/core/src/test/java/org/apache/tamaya/core/internal/converters/LocalDateConverterTest.java
 
b/java8/core/src/test/java/org/apache/tamaya/core/internal/converters/LocalDateConverterTest.java
new file mode 100644
index 0000000..936aaa4
--- /dev/null
+++ 
b/java8/core/src/test/java/org/apache/tamaya/core/internal/converters/LocalDateConverterTest.java
@@ -0,0 +1,41 @@
+/*
+ * 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.tamaya.core.internal.converters;
+
+import org.junit.Test;
+
+import java.time.LocalDate;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.notNullValue;
+
+public class LocalDateConverterTest {
+    public static final LocalDate REF_LOCAL_DATE = LocalDate.of(2007, 4, 1);
+
+    @Test
+    public void canConvertStringToLocalDate() throws Exception {
+        LocalDateConverter converter = new LocalDateConverter();
+
+        LocalDate date = converter.convert(" 2007-04-01\t");
+
+        assertThat(date, notNullValue());
+        assertThat(date, equalTo(REF_LOCAL_DATE));
+    }
+}
\ No newline at end of file

Reply via email to