chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1134727 - in /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl: AbstractCmisTest.java AbstractSessionTest.java
Date Sat, 11 Jun 2011 19:01:49 GMT
Author: fmui
Date: Sat Jun 11 19:01:49 2011
New Revision: 1134727

URL: http://svn.apache.org/viewvc?rev=1134727&view=rev
Log:
CMIS-386: type parent ids can be an empty string

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractCmisTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractCmisTest.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/impl/AbstractCmisTest.java?rev=1134727&r1=1134726&r2=1134727&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractCmisTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractCmisTest.java
Sat Jun 11 19:01:49 2011
@@ -196,6 +196,14 @@ public abstract class AbstractCmisTest i
         return addResultChild(failure, createResult(CmisTestResultStatus.INFO, "Object is
null!"));
     }
 
+    protected CmisTestResult assertStringNullOrEmpty(String str, CmisTestResult success,
CmisTestResult failure) {
+        if ((str == null) || (str.length() == 0)) {
+            return success;
+        }
+
+        return addResultChild(failure, createResult(CmisTestResultStatus.INFO, "String has
this value: " + str));
+    }
+
     protected CmisTestResult assertStringNotEmpty(String str, CmisTestResult success, CmisTestResult
failure) {
         if ((str != null) && (str.length() > 0)) {
             return success;

Modified: 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/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java?rev=1134727&r1=1134726&r2=1134727&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/impl/AbstractSessionTest.java
Sat Jun 11 19:01:49 2011
@@ -847,7 +847,7 @@ public abstract class AbstractSessionTes
             if ((type.getId() != null) && (type.getBaseTypeId() != null)) {
                 if (type.getBaseTypeId().value().equals(type.getId())) {
                     f = createResult(FAILURE, "Base type has parent type!");
-                    addResult(results, assertNull(type.getParentTypeId(), null, f));
+                    addResult(results, assertStringNullOrEmpty(type.getParentTypeId(), null,
f));
                 } else {
                     f = createResult(FAILURE, "Parent type is not set!");
                     addResult(results, assertStringNotEmpty(type.getParentTypeId(), null,
f));



Mime
View raw message