chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1605471 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RepositoryInfoTest.java
Date Wed, 25 Jun 2014 16:19:43 GMT
Author: fmui
Date: Wed Jun 25 16:19:42 2014
New Revision: 1605471

URL: http://svn.apache.org/r1605471
Log:
TCK: added extension feature checks

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=1605471&r1=1605470&r2=1605471&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
Wed Jun 25 16:19:42 2014
@@ -55,8 +55,8 @@ public class RepositoryInfoTest extends 
 
         RepositoryInfo ri = getRepositoryInfo(session);
 
-        // id
-        success = createResult(OK, "Repository id: " + ri.getId());
+        // ID
+        success = createResult(OK, "Repository ID: " + ri.getId());
         failure = createResult(FAILURE, "Repository id is not set!", true);
         addResult(assertStringNotEmpty(ri.getId(), success, failure));
 
@@ -110,8 +110,8 @@ public class RepositoryInfoTest extends 
         }
 
         // root folder
-        success = createResult(OK, "Root folder id: " + ri.getRootFolderId());
-        failure = createResult(FAILURE, "Root folder id is not set!");
+        success = createResult(OK, "Root folder ID: " + ri.getRootFolderId());
+        failure = createResult(FAILURE, "Root folder ID is not set!");
         addResult(assertStringNotEmpty(ri.getRootFolderId(), success, failure));
 
         // thin client URI
@@ -137,13 +137,13 @@ public class RepositoryInfoTest extends 
             }
         }
 
-        // principal id anonymous
-        success = createResult(OK, "Principal Id anonymous: " + ri.getPrincipalIdAnonymous());
-        failure = createResult(WARNING, "Principal Id anonymous is not set!");
+        // principal ID anonymous
+        success = createResult(OK, "Principal ID anonymous: " + ri.getPrincipalIdAnonymous());
+        failure = createResult(WARNING, "Principal ID anonymous is not set!");
         addResult(assertStringNotEmpty(ri.getPrincipalIdAnonymous(), success, failure));
 
-        // principal id anyone
-        success = createResult(OK, "Principal Id anyone: " + ri.getPrincipalIdAnyone());
+        // principal ID anyone
+        success = createResult(OK, "Principal ID anyone: " + ri.getPrincipalIdAnyone());
         failure = createResult(WARNING, "Principal Id anyone is not set!");
         addResult(assertStringNotEmpty(ri.getPrincipalIdAnyone(), success, failure));
 
@@ -175,7 +175,7 @@ public class RepositoryInfoTest extends 
 
             if (ri.getExtensionFeatures() != null) {
                 for (ExtensionFeature feature : ri.getExtensionFeatures()) {
-                    failure = createResult(FAILURE, "At least one repository features has
no id!");
+                    failure = createResult(FAILURE, "At least one repository features has
no ID!");
                     addResult(assertStringNotEmpty(feature.getId(), null, failure));
                 }
             }
@@ -299,7 +299,7 @@ public class RepositoryInfoTest extends 
                     addResult(assertNotNull(permDef, null, failure));
 
                     if (permDef != null) {
-                        failure = createResult(FAILURE, "Id of permission #" + i + " is not
set!");
+                        failure = createResult(FAILURE, "ID of permission #" + i + " is not
set!");
                         addResult(assertStringNotEmpty(permDef.getId(), null, failure));
                     }
 
@@ -313,5 +313,22 @@ public class RepositoryInfoTest extends 
             failure = createResult(WARNING, "Permission mapping is not set!");
             addResult(assertNotNull(aclCap.getPermissionMapping(), success, failure));
         }
+
+        if (ri.getExtensionFeatures() != null) {
+            for (ExtensionFeature ef : ri.getExtensionFeatures()) {
+                success = createResult(OK, "Extension Feature: " + ef.getId());
+                failure = createResult(FAILURE, "Extension Feature without ID!");
+                addResult(assertStringNotEmpty(ef.getId(), success, failure));
+
+                failure = createResult(WARNING, "Extension Feature without common name: "
+ ef.getId());
+                addResult(assertStringNotEmpty(ef.getCommonName(), null, failure));
+
+                failure = createResult(WARNING, "Extension Feature without version label:
" + ef.getId());
+                addResult(assertStringNotEmpty(ef.getVersionLabel(), null, failure));
+
+                failure = createResult(WARNING, "Extension Feature without URL: " + ef.getId());
+                addResult(assertStringNotEmpty(ef.getUrl(), null, failure));
+            }
+        }
     }
 }



Mime
View raw message