You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@chemistry.apache.org by fm...@apache.org on 2010/11/09 12:33:03 UTC
svn commit: r1032929 - in /incubator/chemistry/opencmis/trunk:
chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/
chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemis...
Author: fmui
Date: Tue Nov 9 11:33:02 2010
New Revision: 1032929
URL: http://svn.apache.org/viewvc?rev=1032929&view=rev
Log:
- added more TCK code
Added:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java (with props)
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java (with props)
Modified:
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/resources/cmis-tck-groups.txt
incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java?rev=1032929&r1=1032928&r2=1032929&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java Tue Nov 9 11:33:02 2010
@@ -24,12 +24,14 @@ import static org.apache.chemistry.openc
import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.WARNING;
import java.util.ArrayList;
+import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.chemistry.opencmis.client.api.CmisObject;
import org.apache.chemistry.opencmis.client.api.FileableCmisObject;
import org.apache.chemistry.opencmis.client.api.Folder;
+import org.apache.chemistry.opencmis.client.api.ItemIterable;
import org.apache.chemistry.opencmis.client.api.OperationContext;
import org.apache.chemistry.opencmis.client.api.Property;
import org.apache.chemistry.opencmis.client.api.Session;
@@ -49,6 +51,7 @@ import org.apache.chemistry.opencmis.com
import org.apache.chemistry.opencmis.commons.enums.Cardinality;
import org.apache.chemistry.opencmis.commons.enums.PropertyType;
import org.apache.chemistry.opencmis.commons.enums.Updatability;
+import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
import org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException;
import org.apache.chemistry.opencmis.tck.CmisTestResult;
import org.apache.chemistry.opencmis.tck.CmisTestResultStatus;
@@ -58,7 +61,19 @@ import org.apache.chemistry.opencmis.tck
*/
public abstract class AbstractSessionTest extends AbstractCmisTest {
+ public final static OperationContext SELECT_ALL_NO_CACHE_OC = new OperationContextImpl();
+ static {
+ SELECT_ALL_NO_CACHE_OC.setFilterString("*");
+ SELECT_ALL_NO_CACHE_OC.setCacheEnabled(false);
+ SELECT_ALL_NO_CACHE_OC.setIncludeAllowableActions(true);
+ SELECT_ALL_NO_CACHE_OC.setIncludeAcls(true);
+ SELECT_ALL_NO_CACHE_OC.setIncludePathSegments(true);
+ SELECT_ALL_NO_CACHE_OC.setIncludePolicies(true);
+ SELECT_ALL_NO_CACHE_OC.setRenditionFilterString("*");
+ }
+
private SessionFactory factory = SessionFactoryImpl.newInstance();
+ private Folder testFolder;
public BindingType getBinding() {
if (getParameters() == null) {
@@ -88,6 +103,9 @@ public abstract class AbstractSessionTes
session = factory.getRepositories(parameters).get(0).createSession();
}
+ // switch off the cache
+ session.getDefaultContext().setCacheEnabled(false);
+
try {
run(session);
} catch (Exception e) {
@@ -108,6 +126,185 @@ public abstract class AbstractSessionTes
return ri;
}
+ // --- handy create and delete methods ---
+
+ /**
+ * Creates a folder.
+ */
+ protected Folder createFolder(Folder parent, String name) {
+ String objectTypeId = getParameters().get(TestParameters.DEFAULT_FOLDER_TYPE);
+ if (objectTypeId == null) {
+ objectTypeId = TestParameters.DEFAULT_FOLDER_TYPE_VALUE;
+ }
+
+ return createFolder(parent, name, objectTypeId);
+ }
+
+ /**
+ * Creates a folder.
+ */
+ protected Folder createFolder(Folder parent, String name, String objectTypeId) {
+ Folder result = null;
+
+ CmisTestResult f;
+
+ Map<String, Object> properties = new HashMap<String, Object>();
+ properties.put(PropertyIds.NAME, name);
+ properties.put(PropertyIds.OBJECT_TYPE_ID, objectTypeId);
+
+ try {
+ // create the folder
+ result = parent.createFolder(properties);
+ } catch (CmisBaseException e) {
+ addResult(createResult(UNEXPECTED_EXCEPTION, "Folder could not be created! Exception: " + e.getMessage(),
+ e, true));
+ }
+
+ try {
+ // check the new folder
+ String[] propertiesToCheck = new String[result.getType().getPropertyDefinitions().size()];
+
+ int i = 0;
+ for (String propId : result.getType().getPropertyDefinitions().keySet()) {
+ propertiesToCheck[i++] = propId;
+ }
+
+ addResult(checkObject(result, propertiesToCheck, "New folder object spec compliance"));
+
+ // check object parents
+ List<Folder> objectParents = result.getParents();
+
+ f = createResult(FAILURE, "Newly created folder has no or more than one parent! Id: " + result.getId(),
+ true);
+ addResult(assertEquals(1, objectParents.size(), null, f));
+
+ f = createResult(FAILURE, "First object parent of the newly created folder does not match parent! Id: "
+ + result.getId(), true);
+ assertShallowEquals(parent, objectParents.get(0), null, f);
+
+ // check folder parent
+ Folder folderParent = result.getFolderParent();
+ f = createResult(FAILURE, "Newly created folder has no folder parent! Id: " + result.getId(), true);
+ addResult(assertNotNull(folderParent, null, f));
+
+ f = createResult(FAILURE,
+ "Folder parent of the newly created folder does not match parent! Id: " + result.getId(), true);
+ assertShallowEquals(parent, folderParent, null, f);
+
+ // check children of parent
+ boolean found = false;
+ for (CmisObject child : parent.getChildren()) {
+ if (child == null) {
+ addResult(createResult(FAILURE, "Parent folder contains a null child!", true));
+ } else {
+ if (result.getId().equals(child.getId())) {
+ found = true;
+
+ f = createResult(FAILURE, "Folder and parent child don't match! Id: " + result.getId(), true);
+ assertShallowEquals(result, child, null, f);
+ break;
+ }
+ }
+ }
+
+ if (!found) {
+ addResult(createResult(FAILURE, "Folder is not a child of the parent folder! Id: " + result.getId(),
+ true));
+ }
+ } catch (CmisBaseException e) {
+ addResult(createResult(UNEXPECTED_EXCEPTION,
+ "Newly created folder is invalid! Exception: " + e.getMessage(), e, true));
+ }
+
+ return result;
+ }
+
+ /**
+ * Deletes an object and checks if it is deleted.
+ */
+ protected void deleteObject(CmisObject object) {
+ if (object != null) {
+ if (object instanceof Folder) {
+ try {
+ ((Folder) object).deleteTree(true, null, true);
+ } catch (CmisBaseException e) {
+ addResult(createResult(UNEXPECTED_EXCEPTION,
+ "Folder could not be deleted! Exception: " + e.getMessage(), e, true));
+ }
+ } else {
+ try {
+ object.delete(true);
+ } catch (CmisBaseException e) {
+ addResult(createResult(UNEXPECTED_EXCEPTION,
+ "Object could not be deleted! Exception: " + e.getMessage(), e, true));
+ }
+ }
+
+ CmisTestResult f = createResult(FAILURE, "Object should not exist anymore but it is still there! Id: "
+ + object.getId(), true);
+ addResult(assertIsFalse(exists(object), null, f));
+ }
+ }
+
+ /**
+ * Tests if an object exists by refreshing it.
+ */
+ protected boolean exists(CmisObject object) {
+ try {
+ object.refresh();
+ return true;
+ } catch (CmisObjectNotFoundException e) {
+ return false;
+ }
+ }
+
+ // --- test folder methods ---
+
+ /**
+ * Creates a test folder.
+ */
+ protected Folder createTestFolder(Session session) {
+
+ String testFolderParentPath = getParameters().get(TestParameters.DEFAULT_TEST_FOLDER_PARENT);
+ if (testFolderParentPath == null) {
+ testFolderParentPath = TestParameters.DEFAULT_TEST_FOLDER_PARENT_VALUE;
+ }
+
+ String name = "cmistck" + System.currentTimeMillis() + session.getRepositoryInfo().hashCode();
+
+ Folder parent = null;
+ try {
+ CmisObject parentObject = session.getObjectByPath(testFolderParentPath);
+ if (!(parentObject instanceof Folder)) {
+ addResult(createResult(FAILURE, "Parent folder of the test folder is actually not a folder! Path: "
+ + testFolderParentPath, true));
+ }
+
+ parent = (Folder) parentObject;
+ } catch (CmisBaseException e) {
+ addResult(createResult(UNEXPECTED_EXCEPTION,
+ "Test folder could not be created! Exception: " + e.getMessage(), e, true));
+ }
+
+ testFolder = createFolder(parent, name);
+
+ return testFolder;
+ }
+
+ /**
+ * Get the test folder.
+ */
+ protected Folder getTestFolder() {
+ return testFolder;
+ }
+
+ /**
+ * Delete the test folder.
+ */
+ protected void deleteTestFolder() {
+ deleteObject(testFolder);
+ }
+
// --- reusable checks ----
protected CmisTestResult checkObject(CmisObject object, String[] properties, String message) {
@@ -282,12 +479,12 @@ public abstract class AbstractSessionTes
addResult(results, assertNotNull(folder, null, f));
if (folder != null) {
- OperationContext oc = new OperationContextImpl();
- oc.setFilterString("*");
- oc.setCacheEnabled(false);
- oc.setIncludeAllowableActions(true);
+ long count = 0;
+ ItemIterable<CmisObject> children = folder.getChildren(SELECT_ALL_NO_CACHE_OC);
+
+ for (CmisObject child : children) {
+ count++;
- for (CmisObject child : folder.getChildren(oc)) {
if (child == null) {
addResult(results, createResult(FAILURE, "Folder contains a null child!"));
} else {
@@ -328,6 +525,8 @@ public abstract class AbstractSessionTes
f = createResult(FAILURE, "Folder is not found in childs parents! Id: " + child.getId());
addResult(results, assertIsTrue(parents.size() > 0, null, f));
}
+ } else {
+ addResult(results, createResult(FAILURE, "Found a non-filealed child! Id: " + child.getId()));
}
f = createResult(FAILURE,
@@ -341,6 +540,9 @@ public abstract class AbstractSessionTes
}
}
}
+
+ f = createResult(WARNING, "Number of children doesn't match the reported total number of items!");
+ addResult(results, assertEquals(count, children.getTotalNumItems(), null, f));
}
CmisTestResultImpl result = createResult(getWorst(results), message);
@@ -349,6 +551,57 @@ public abstract class AbstractSessionTes
return (result.getStatus().getLevel() <= OK.getLevel() ? null : result);
}
+ protected CmisTestResult assertShallowEquals(CmisObject expected, CmisObject actual, CmisTestResult success,
+ CmisTestResult failure) {
+
+ List<CmisTestResult> results = new ArrayList<CmisTestResult>();
+
+ CmisTestResult f;
+
+ if ((expected == null) && (actual == null)) {
+ return success;
+ }
+
+ if (expected == null) {
+ f = createResult(FAILURE, "Expected object is null, but actual object is not!");
+ addResultChild(failure, f);
+
+ return failure;
+ }
+
+ if (actual == null) {
+ f = createResult(FAILURE, "Actual object is null, but expected object is not!");
+ addResultChild(failure, f);
+
+ return failure;
+ }
+
+ f = createResult(FAILURE, "Ids don't match!");
+ addResult(results, assertEquals(expected.getId(), actual.getId(), null, f));
+
+ f = createResult(FAILURE, "Base types don't match!");
+ addResult(results, assertEquals(expected.getBaseTypeId(), actual.getBaseTypeId(), null, f));
+
+ f = createResult(FAILURE, "Types don't match!");
+ addResult(results, assertEquals(expected.getType().getId(), actual.getType().getId(), null, f));
+
+ if (getWorst(results).getLevel() <= OK.getLevel()) {
+ for (CmisTestResult result : results) {
+ addResultChild(success, result);
+ }
+
+ return success;
+ } else {
+ for (CmisTestResult result : results) {
+ addResultChild(failure, result);
+ }
+
+ return failure;
+ }
+ }
+
+ // --- type checks ---
+
protected CmisTestResult checkTypeDefinition(Session session, TypeDefinition type, String message) {
List<CmisTestResult> results = new ArrayList<CmisTestResult>();
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java?rev=1032929&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java Tue Nov 9 11:33:02 2010
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.tck.impl;
+
+public class TestParameters {
+ public static final String DEFAULT_FOLDER_TYPE = "org.apache.chemistry.opencmis.tck.default.folderType";
+ public static final String DEFAULT_FOLDER_TYPE_VALUE = "cmis:folder";
+
+ public static final String DEFAULT_DOCUMENT_TYPE = "org.apache.chemistry.opencmis.tck.default.documentType";
+ public static final String DEFAULT_DOCUMENT_TYPE_VALUE = "cmis:document";
+
+ public static final String DEFAULT_TEST_FOLDER_PARENT = "org.apache.chemistry.opencmis.tck.default.testFolderParent";
+ public static final String DEFAULT_TEST_FOLDER_PARENT_VALUE = "/";
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/TestParameters.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java?rev=1032929&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java Tue Nov 9 11:33:02 2010
@@ -0,0 +1,37 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.tck.tests.crud;
+
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTestGroup;
+
+/**
+ * This test group contains simple Create, Read, Update and Delete tests.
+ */
+public class CRUDTestGroup extends AbstractSessionTestGroup {
+ @Override
+ public void init(Map<String, String> parameters) throws Exception {
+ super.init(parameters);
+
+ setName("CRUD Test Group");
+
+ addTest(new CreateAndDeleteFolderTest());
+ }
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CRUDTestGroup.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java?rev=1032929&view=auto
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java (added)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java Tue Nov 9 11:33:02 2010
@@ -0,0 +1,107 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.chemistry.opencmis.tck.tests.crud;
+
+import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.FAILURE;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.chemistry.opencmis.client.api.CmisObject;
+import org.apache.chemistry.opencmis.client.api.Folder;
+import org.apache.chemistry.opencmis.client.api.ItemIterable;
+import org.apache.chemistry.opencmis.client.api.Session;
+import org.apache.chemistry.opencmis.commons.PropertyIds;
+import org.apache.chemistry.opencmis.tck.CmisTestResult;
+import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest;
+
+/**
+ * Simple folder test.
+ */
+public class CreateAndDeleteFolderTest extends AbstractSessionTest {
+
+ @Override
+ public void init(Map<String, String> parameters) {
+ super.init(parameters);
+ setName("Create and Delete Folder Test");
+ }
+
+ @Override
+ public void run(Session session) {
+ CmisTestResult f;
+
+ // create a test folder
+ Folder testFolder = createTestFolder(session);
+
+ int numOfFolders = 100;
+ Map<String, Folder> folders = new HashMap<String, Folder>();
+ String[] propertiesToCheck = new String[] { PropertyIds.OBJECT_ID, PropertyIds.BASE_TYPE_ID,
+ PropertyIds.OBJECT_TYPE_ID };
+
+ // create folders
+ for (int i = 0; i < numOfFolders; i++) {
+ Folder newFolder = createFolder(testFolder, "folder" + i);
+ addResult(checkObject(newFolder, propertiesToCheck,
+ "New folder object spec compliance. Id: " + newFolder.getId()));
+ folders.put(newFolder.getId(), newFolder);
+ }
+
+ // simple children test
+ addResult(checkChildren(testFolder, "Test folder children check"));
+
+ // check if all folders are there
+ ItemIterable<CmisObject> children = testFolder.getChildren();
+ List<String> childrenIds = new ArrayList<String>();
+ for (CmisObject child : children) {
+ if (child != null) {
+ childrenIds.add(child.getId());
+ Folder folder = folders.get(child.getId());
+
+ f = createResult(FAILURE, "Folder and test folder child don't match! Id: " + child.getId());
+ addResult(assertShallowEquals(folder, child, null, f));
+ }
+ }
+
+ f = createResult(FAILURE, "Number of created folders does not match the number of existing folders!");
+ addResult(assertEquals(numOfFolders, childrenIds.size(), null, f));
+
+ for (Folder folder : folders.values()) {
+ if (!childrenIds.contains(folder.getId())) {
+ addResult(createResult(FAILURE,
+ "Created folder not found in test folder children! Id: " + folder.getId()));
+ }
+ }
+
+ // delete all folders
+ for (Folder folder : folders.values()) {
+ // empty folders should be deleteable like this
+ folder.delete(true);
+
+ f = createResult(FAILURE, "Folder should not exist anymore but it is still there! Id: " + folder.getId());
+ addResult(assertIsFalse(exists(folder), null, f));
+ }
+
+ // delete the test folder
+ deleteTestFolder();
+
+ addResult(createInfoResult("Tested the creation and deletion of " + numOfFolders + " folders."));
+ }
+}
Propchange: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteFolderTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/resources/cmis-tck-groups.txt
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/resources/cmis-tck-groups.txt?rev=1032929&r1=1032928&r2=1032929&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/resources/cmis-tck-groups.txt (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/resources/cmis-tck-groups.txt Tue Nov 9 11:33:02 2010
@@ -21,4 +21,5 @@
# TCK group class list.
###############################################################
-org.apache.chemistry.opencmis.tck.tests.basics.BasicsTestGroup
\ No newline at end of file
+org.apache.chemistry.opencmis.tck.tests.basics.BasicsTestGroup
+org.apache.chemistry.opencmis.tck.tests.crud.CRUDTestGroup
\ No newline at end of file
Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java?rev=1032929&r1=1032928&r2=1032929&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java (original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/TckDialog.java Tue Nov 9 11:33:02 2010
@@ -121,7 +121,7 @@ public class TckDialog {
public void actionPerformed(ActionEvent event) {
int answer = JOptionPane.showConfirmDialog(owner,
"Running the TCK may take a long time and may add, remove and alter data in the repository!\n"
- + "It also puts at a strain on the repository, performing several hundred calls!\n"
+ + "It also puts at a strain on the repository, performing several thousand calls!\n"
+ "\nAre you sure you want to proceed?", "TCK", JOptionPane.YES_NO_OPTION,JOptionPane.WARNING_MESSAGE);
if (answer == JOptionPane.YES_OPTION) {