jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r157955 - incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java
Date Thu, 17 Mar 2005 18:14:17 GMT
Author: mreutegg
Date: Thu Mar 17 10:14:16 2005
New Revision: 157955

URL: http://svn.apache.org/viewcvs?view=rev&rev=157955
Log:
More Property.setValue() test cases.

Modified:
    incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java?view=diff&r1=157954&r2=157955
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/SetValueStringTest.java
Thu Mar 17 10:14:16 2005
@@ -378,4 +378,28 @@
             //success : the property has been deleted by assigning it a null value
         }
     }
+
+    /**
+     * Test the assignment of an empty property by assigning it a null array,
+     * saved from the parent Node
+     */
+    public void testEmptyMultiStringParent() throws RepositoryException {
+        String[] emptyStringArray = new String[]{null};
+        property2.setValue(emptyStringArray);
+        node.save();
+
+        assertEquals("Property.setValue(emptyStringArray) did not set the property to an
empty array", 0, property2.getValues().length);
+    }
+
+    /**
+     * Test the assignment of an empty property by assigning it a null array,
+     * saved from the Session
+     */
+    public void testEmptyMultiStringSession() throws RepositoryException {
+        String[] emptyStringArray = new String[]{null};
+        property2.setValue(emptyStringArray);
+        superuser.save();
+
+        assertEquals("Property.setValue(emptyStringArray) did not set the property to an
empty array", 0, property2.getValues().length);
+    }
 }



Mime
View raw message