You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by dp...@apache.org on 2010/03/30 15:02:53 UTC
svn commit: r929123 -
/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
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"));
+ }
+
}