chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1032586 - in /incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck: impl/AbstractSessionTest.java tests/basics/RootFolderTest.java
Date Mon, 08 Nov 2010 14:36:21 GMT
Author: fmui
Date: Mon Nov  8 14:36:21 2010
New Revision: 1032586

URL: http://svn.apache.org/viewvc?rev=1032586&view=rev
Log:
- TCK fixes

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/java/org/apache/chemistry/opencmis/tck/tests/basics/RootFolderTest.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=1032586&r1=1032585&r2=1032586&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
Mon Nov  8 14:36:21 2010
@@ -132,9 +132,9 @@ public abstract class AbstractSessionTes
                 // known properties that are strings and must be set
                 if (PropertyIds.OBJECT_ID.equals(propId) || PropertyIds.BASE_TYPE_ID.equals(propId)
                         || PropertyIds.OBJECT_TYPE_ID.equals(propId) || PropertyIds.CREATED_BY.equals(propId)
-                        || PropertyIds.LAST_MODIFIED_BY.equals(propId) || PropertyIds.CHANGE_TOKEN.equals(propId)
-                        || PropertyIds.PATH.equals(propId) || PropertyIds.SOURCE_ID.equals(propId)
-                        || PropertyIds.TARGET_ID.equals(propId) || PropertyIds.POLICY_TEXT.equals(propId))
{
+                        || PropertyIds.LAST_MODIFIED_BY.equals(propId) || PropertyIds.PATH.equals(propId)
+                        || PropertyIds.SOURCE_ID.equals(propId) || PropertyIds.TARGET_ID.equals(propId)
+                        || PropertyIds.POLICY_TEXT.equals(propId)) {
                     propertyCheck = PropertyCheckEnum.STRING_MUST_NOT_BE_EMPTY;
                 }
 
@@ -171,7 +171,7 @@ public abstract class AbstractSessionTes
 
             // allowable actions
             f = createResult(FAILURE, "Object has no CAN_GET_PROPERTIES allowable action!");
-            addResult(results, assertNotAllowableAction(object, Action.CAN_GET_PROPERTIES,
null, f));
+            addResult(results, assertAllowableAction(object, Action.CAN_GET_PROPERTIES, null,
f));
         }
 
         CmisTestResultImpl result = createResult(getWorst(results), message);
@@ -298,7 +298,7 @@ public abstract class AbstractSessionTes
                         propertiesToCheck[i++] = propId;
                     }
 
-                    addResult(results, checkObject(folder, propertiesToCheck, "Child check:
" + child.getId()));
+                    addResult(results, checkObject(child, propertiesToCheck, "Child check:
" + child.getId()));
 
                     f = createResult(FAILURE, "Child is not fileable! Id: " + child.getId()
+ " / Type: "
                             + child.getType().getId());
@@ -331,8 +331,14 @@ public abstract class AbstractSessionTes
                     }
 
                     f = createResult(FAILURE,
-                            "Child has no CAN_GET_FOLDER_PARENT allowable action! Id: " +
child.getId());
-                    addResult(results, assertAllowableAction(folder, Action.CAN_GET_FOLDER_PARENT,
null, f));
+                            "Child has no CAN_GET_OBJECT_PARENTS allowable action! Id: "
+ child.getId());
+                    addResult(results, assertAllowableAction(child, Action.CAN_GET_OBJECT_PARENTS,
null, f));
+
+                    if (child instanceof Folder) {
+                        f = createResult(FAILURE,
+                                "Child has no CAN_GET_FOLDER_PARENT allowable action! Id:
" + child.getId());
+                        addResult(results, assertAllowableAction(child, Action.CAN_GET_FOLDER_PARENT,
null, f));
+                    }
                 }
             }
         }

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RootFolderTest.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/basics/RootFolderTest.java?rev=1032586&r1=1032585&r2=1032586&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RootFolderTest.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/basics/RootFolderTest.java
Mon Nov  8 14:36:21 2010
@@ -90,7 +90,7 @@ public class RootFolderTest extends Abst
         addResult(assertNotAllowableAction(rootFolder, Action.CAN_GET_FOLDER_PARENT, null,
failure));
 
         failure = createResult(WARNING, "Root folder has no CAN_GET_CHILDREN allowable action!");
-        addResult(assertNotAllowableAction(rootFolder, Action.CAN_GET_CHILDREN, null, failure));
+        addResult(assertAllowableAction(rootFolder, Action.CAN_GET_CHILDREN, null, failure));
 
         // simple children test
         addResult(checkChildren(rootFolder, "Root folder children check"));



Mime
View raw message