chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dpfis...@apache.org
Subject svn commit: r929123 - /incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
Date Tue, 30 Mar 2010 13:02:53 GMT
Author: dpfister
Date: Tue Mar 30 13:02:52 2010
New Revision: 929123

URL: http://svn.apache.org/viewvc?rev=929123&view=rev
Log:
CMIS-186 - https://issues.apache.org/jira/browse/CMIS-186
- test case that exposes failure

Modified:
    incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java

Modified: incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java?rev=929123&r1=929122&r2=929123&view=diff
==============================================================================
--- incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
(original)
+++ incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
Tue Mar 30 13:02:52 2010
@@ -825,4 +825,23 @@ public abstract class BasicTestCase exte
         assertTrue(aa.contains(AllowableAction.CAN_UPDATE_PROPERTIES));
     }
 
+    /**
+     * Update properties of a folder, including read-only properties. These should
+     * be silently ignored.
+     *
+     * @see http://issues.apache.org/jira/browse/CMIS-186
+     * @throws Exception
+     */
+    public void testUpdateReadOnlyProperty() throws Exception {
+        ObjectEntry ob = spi.getObjectByPath("/folder 1", null);
+        // update
+        Map<String, Serializable> properties = new HashMap<String, Serializable>();
+        properties.put("description", "new descr");
+        properties.put(Property.PATH, ob.getValue(Property.PATH));
+        spi.updateProperties(ob, null, properties);
+        // refetch
+        ob = spi.getProperties(ob, null);
+        assertEquals("new descr", ob.getValue("description"));
+    }
+
 }



Mime
View raw message