}
log.info("... testCreateObject() finished.");
// test create a document with a folder type, should fail:
try {
Properties props = createDocumentProperties("DocumentWithAFolderType", FOLDER_TYPE_ID);
id = fObjSvc.createDocument(fRepositoryId, props, fRootFolderId, null, VersioningState.NONE, null, null,
null, null);
assertNotNull(id);
fail("Creating document with a folder type should fail.");
} catch (Exception e) {
log.info("Creating document with a folder type failed as expected.");
}
// test create a document with an illegal name, should fail:
try {
Properties props = createDocumentProperties("abc ()", DOCUMENT_TYPE_ID);
fObjSvc.createDocument(fRepositoryId, props, fRootFolderId, null, VersioningState.NONE, null, null,
null, null);
fail("Creating document with an illegal name should fail.");
} catch (Exception e) {
assertTrue(e instanceof CmisInvalidArgumentException);