jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r1464502 - /jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java
Date Thu, 04 Apr 2013 12:36:01 GMT
Author: mreutegg
Date: Thu Apr  4 12:36:00 2013
New Revision: 1464502

URL: http://svn.apache.org/r1464502
Log:
OAK-749: Date PropertyState may cause ClassCastException
- test case

Modified:
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java?rev=1464502&r1=1464501&r2=1464502&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/plugins/memory/PropertyStatesTest.java
Thu Apr  4 12:36:00 2013
@@ -19,14 +19,19 @@
 
 package org.apache.jackrabbit.oak.plugins.memory;
 
+import java.util.Calendar;
+
 import javax.jcr.PropertyType;
 import javax.jcr.RepositoryException;
 import javax.jcr.Value;
 
 import org.apache.jackrabbit.oak.TestNameMapper;
 import org.apache.jackrabbit.oak.api.PropertyState;
+import org.apache.jackrabbit.oak.api.Type;
 import org.apache.jackrabbit.oak.namepath.NamePathMapperImpl;
 import org.apache.jackrabbit.oak.plugins.value.ValueFactoryImpl;
+import org.apache.jackrabbit.util.ISO8601;
+import org.junit.Ignore;
 import org.junit.Test;
 
 import static java.util.Collections.singletonMap;
@@ -53,4 +58,14 @@ public class PropertyStatesTest {
         PropertyState namePropertyFromValue = PropertyStates.createProperty("path", nameValue);
         assertEquals(pathProperty, namePropertyFromValue);
     }
+
+    @Test
+    @Ignore("OAK-749")
+    public void dateValueFromDateProperty() throws RepositoryException {
+        String expected = ISO8601.format(Calendar.getInstance());
+        PropertyState dateProperty = PropertyStates.createProperty(
+                "date", expected, Type.DATE);
+        String actual = dateProperty.getValue(Type.DATE);
+        assertEquals(expected, actual);
+    }
 }



Mime
View raw message