You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by sk...@apache.org on 2010/06/17 17:26:13 UTC
svn commit: r955637 - in
/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit:
./
src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java
Author: sklevenz
Date: Thu Jun 17 15:26:13 2010
New Revision: 955637
URL: http://svn.apache.org/viewvc?rev=955637&view=rev
Log:
New test prepared: AbstractWriteObjectIT.updateSinglePropertyAndCheckName
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/ (props changed)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/
------------------------------------------------------------------------------
--- svn:ignore (original)
+++ svn:ignore Thu Jun 17 15:26:13 2010
@@ -4,3 +4,5 @@ target
*.ipr
*.iml
.*
+
+log4j.log.1
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java?rev=955637&r1=955636&r2=955637&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-fit/src/test/java/org/apache/chemistry/opencmis/fit/runtime/AbstractWriteObjectIT.java Thu Jun 17 15:26:13 2010
@@ -169,7 +169,7 @@ public abstract class AbstractWriteObjec
assertEquals("Neuer Name", document.getName());
}
- @Ignore
+ @Ignore
@Test
public void updateSinglePropertyAndCheckName() {
// verify content
@@ -177,9 +177,9 @@ public abstract class AbstractWriteObjec
Document document = (Document) this.session.getObjectByPath(path);
assertNotNull("Document not found: " + path, document);
- String lastModifiedBy = UUID.randomUUID().toString();
+ String value = UUID.randomUUID().toString();
Map<String, Object> properties = new HashMap<String, Object>();
- properties.put(PropertyIds.LAST_MODIFIED_BY, lastModifiedBy);
+ properties.put(PropertyIds.CHECKIN_COMMENT, value);
String id = document.getId();
assertNotNull(id);
@@ -188,10 +188,20 @@ public abstract class AbstractWriteObjec
ObjectId newId = document.updateProperties(properties);
assertNotNull(newId);
assertEquals(id, newId.getId()); // should not be a new version
+
+ session.clear();
// verify
- assertEquals(lastModifiedBy, document.getLastModifiedBy());
- assertEquals(FixtureData.DOCUMENT1_NAME, document.getName());
+ String s1 = FixtureData.DOCUMENT1_NAME.toString();
+ String s2 = document.getName();
+ assertEquals(s1, s2);
+
+ Property<String> p = document.getProperty(PropertyIds.NAME);
+ String s3 = p.getFirstValue();
+ assertEquals(s1, s3);
+
+ Document document2 = (Document) this.session.getObjectByPath(path);
+ assertNotNull("Document not found: " + path, document2);
}
private String getContentAsString(ContentStream stream) throws IOException {