jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r1330311 - /jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Date Wed, 25 Apr 2012 14:37:27 GMT
Author: angela
Date: Wed Apr 25 14:37:26 2012
New Revision: 1330311

URL: http://svn.apache.org/viewvc?rev=1330311&view=rev
Log:
OAK-16 : Proper ValueFactory implementation and Value handling (WIP)

- spit empty-mv-property test

Modified:
    jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java

Modified: jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java?rev=1330311&r1=1330310&r2=1330311&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
(original)
+++ jackrabbit/oak/trunk/oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/RepositoryTest.java
Wed Apr 25 14:37:26 2012
@@ -782,7 +782,6 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
     @Test
     public void addEmptyMultiValuedProperty() throws RepositoryException {
         Node parentNode = getNode(TEST_PATH);
@@ -795,7 +794,6 @@ public class RepositoryTest extends Abst
         try {
             Property property = session2.getProperty(TEST_PATH + "/multi empty");
             assertTrue(property.isMultiple());
-            assertEquals(PropertyType.BOOLEAN, property.getType());
             Value[] values2 = property.getValues();
             assertEquals(0, values2.length);
         }
@@ -804,7 +802,26 @@ public class RepositoryTest extends Abst
         }
     }
 
-    @Ignore // TODO implement value coding in ValueConverter
+    @Ignore // TODO retrieve type for empty-mv properties
+    @Test
+    public void testEmptyMultiValuedPropertyType() throws RepositoryException {
+        Node parentNode = getNode(TEST_PATH);
+        Value[] values = new Value[0];
+
+        parentNode.setProperty("multi empty", values, PropertyType.BOOLEAN);
+        parentNode.getSession().save();
+
+        Session session2 = getRepository().login();
+        try {
+            Property property = session2.getProperty(TEST_PATH + "/multi empty");
+            assertEquals(PropertyType.BOOLEAN, property.getType());
+        }
+        finally {
+            session2.logout();
+        }
+    }
+
+    @Ignore // TODO retrieve type for empty-mv properties
     @Test
     public void addEmptyMultiValuedProperty_JCR_2992_WorkaroundTest() throws RepositoryException
{
         Node parentNode = getNode(TEST_PATH);



Mime
View raw message