chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1459373 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java
Date Thu, 21 Mar 2013 15:54:11 GMT
Author: fmui
Date: Thu Mar 21 15:54:10 2013
New Revision: 1459373

URL: http://svn.apache.org/r1459373
Log:
TCK: minor enhancements

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java?rev=1459373&r1=1459372&r2=1459373&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java
Thu Mar 21 15:54:10 2013
@@ -26,9 +26,11 @@ import java.util.Map;
 
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.commons.data.AclCapabilities;
+import org.apache.chemistry.opencmis.commons.data.ExtensionFeature;
 import org.apache.chemistry.opencmis.commons.data.RepositoryCapabilities;
 import org.apache.chemistry.opencmis.commons.data.RepositoryInfo;
 import org.apache.chemistry.opencmis.commons.definitions.PermissionDefinition;
+import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
 import org.apache.chemistry.opencmis.tck.CmisTestResult;
 import org.apache.chemistry.opencmis.tck.impl.AbstractSessionTest;
 
@@ -145,6 +147,20 @@ public class RepositoryInfoTest extends 
             addResult(assertIsTrue(ri.getChangesOnType().size() < 5, null, failure));
         }
 
+        // features
+        if (ri.getCmisVersion() != CmisVersion.CMIS_1_0) {
+            success = createResult(OK, "Repository features exposed.");
+            failure = createResult(OK, "No repository features exposed.");
+            addResult(assertNotNull(ri.getExtensionFeatures(), success, failure));
+
+            if (ri.getExtensionFeatures() != null) {
+                for (ExtensionFeature feature : ri.getExtensionFeatures()) {
+                    failure = createResult(FAILURE, "At least one repository features has
no id!");
+                    addResult(assertStringNotEmpty(feature.getId(), null, failure));
+                }
+            }
+        }
+
         // capabilities
         if (ri.getCapabilities() == null) {
             addResult(createResult(FAILURE, "Capabilities are not set!"));
@@ -220,6 +236,18 @@ public class RepositoryInfoTest extends 
             success = createResult(OK, "Renditions capability: " + cap.getRenditionsCapability());
             failure = createResult(FAILURE, "Renditions capability is not set!");
             addResult(assertNotNull(cap.getRenditionsCapability(), success, failure));
+
+            if (ri.getCmisVersion() != CmisVersion.CMIS_1_0) {
+                // new type settable attributes
+                success = createResult(OK, "'New type settable attributes' flags are set.");
+                failure = createResult(WARNING, "'New type settable attributes' flags are
not set!");
+                addResult(assertNotNull(cap.getNewTypeSettableAttributes(), success, failure));
+
+                // creatable property types
+                success = createResult(OK, "'Creatable property types' flags are set.");
+                failure = createResult(WARNING, "'Creatable property types' flags are not
set!");
+                addResult(assertNotNull(cap.getCreatablePropertyTypes(), success, failure));
+            }
         }
 
         // ACL capabilities



Mime
View raw message