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 16:33:57 UTC
svn commit: r929153 -
/incubator/chemistry/trunk/chemistry/chemistry-tests/src/main/java/org/apache/chemistry/test/BasicTestCase.java
Author: dpfister
Date: Tue Mar 30 14:33:56 2010
New Revision: 929153
URL: http://svn.apache.org/viewvc?rev=929153&view=rev
Log:
CMIS-186 - Adding folder or document fails: ""Read-only property: cmis:path"
- Write read-only property 'cmis:lastModificationDate' in test
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=929153&r1=929152&r2=929153&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 14:33:56 2010
@@ -826,8 +826,8 @@ public abstract class BasicTestCase exte
}
/**
- * Update properties of a folder, including read-only properties. These should
- * be silently ignored.
+ * Update properties of a folder and a document, including read-only properties.
+ * These should be silently ignored.
*
* @see http://issues.apache.org/jira/browse/CMIS-186
* @throws Exception
@@ -842,6 +842,19 @@ public abstract class BasicTestCase exte
// refetch
ob = spi.getProperties(ob, null);
assertEquals("new descr", ob.getValue("description"));
+
+ ob = spi.getObjectByPath("/folder 1/doc 1", null);
+ assertEquals("doc 1 title", ob.getValue("title"));
+ assertEquals("The doc 1 descr", ob.getValue("description"));
+ // update
+ properties = new HashMap<String, Serializable>();
+ properties.put("description", "new descr");
+ properties.put(Property.LAST_MODIFICATION_DATE, Calendar.getInstance());
+ spi.updateProperties(ob, null, properties);
+ // refetch
+ ob = spi.getProperties(ob, null);
+ assertEquals("doc 1 title", ob.getValue("title"));
+ assertEquals("new descr", ob.getValue("description"));
}
}