chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1683331 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/types/BaseTypesTest.java
Date Wed, 03 Jun 2015 13:40:42 GMT
Author: fmui
Date: Wed Jun  3 13:40:42 2015
New Revision: 1683331

URL: http://svn.apache.org/r1683331
Log:
TCK: improved base types test

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

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/types/BaseTypesTest.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/types/BaseTypesTest.java?rev=1683331&r1=1683330&r2=1683331&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/types/BaseTypesTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/types/BaseTypesTest.java
Wed Jun  3 13:40:42 2015
@@ -21,6 +21,7 @@ package org.apache.chemistry.opencmis.tc
 import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.FAILURE;
 import static org.apache.chemistry.opencmis.tck.CmisTestResultStatus.WARNING;
 
+import java.math.BigInteger;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.List;
@@ -32,6 +33,7 @@ import org.apache.chemistry.opencmis.cli
 import org.apache.chemistry.opencmis.client.api.Session;
 import org.apache.chemistry.opencmis.client.api.Tree;
 import org.apache.chemistry.opencmis.commons.definitions.TypeDefinition;
+import org.apache.chemistry.opencmis.commons.definitions.TypeDefinitionList;
 import org.apache.chemistry.opencmis.commons.enums.BaseTypeId;
 import org.apache.chemistry.opencmis.commons.enums.CmisVersion;
 import org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException;
@@ -172,6 +174,23 @@ public class BaseTypesTest extends Abstr
             }
         }
 
+        // simple getTypeChildren paging test - skipping over all base types mut
+        // return an empty list
+        TypeDefinitionList typeDefinitionList = session
+                .getBinding()
+                .getRepositoryService()
+                .getTypeChildren(session.getRepositoryInfo().getId(), null, false, BigInteger.valueOf(100),
+                        BigInteger.valueOf(6), null);
+        if (typeDefinitionList == null) {
+            addResult(createResult(FAILURE, "getTypeChildren() returned nothing!"));
+        } else if (typeDefinitionList.getList() != null && !typeDefinitionList.getList().isEmpty())
{
+            addResult(createResult(
+                    FAILURE,
+                    "A getTypeChildren() call on the base types must retrun an empty list
if skipCount is >= 6! The repository returned a list of "
+                            + typeDefinitionList.getList().size() + " elements."));
+        }
+
+        // test getTypeDescendants()
         int numOfTypes = runTypeChecks(session, session.getTypeDescendants(null, -1, true));
 
         addResult(createInfoResult("Checked " + numOfTypes + " type definitions."));



Mime
View raw message