chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1525888 - /chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
Date Tue, 24 Sep 2013 13:50:42 GMT
Author: fmui
Date: Tue Sep 24 13:50:42 2013
New Revision: 1525888

URL: http://svn.apache.org/r1525888
Log:
TCK: changed LIKE test to accept a case-insensitive result set

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

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.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/query/QueryLikeTest.java?rev=1525888&r1=1525887&r2=1525888&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/query/QueryLikeTest.java
Tue Sep 24 13:50:42 2013
@@ -30,7 +30,7 @@ import org.apache.chemistry.opencmis.com
 import org.apache.chemistry.opencmis.tck.CmisTestResult;
 
 /**
- * Query LIKE test. 
+ * Query LIKE test.
  */
 public class QueryLikeTest extends AbstractQueryTest {
 
@@ -64,7 +64,7 @@ public class QueryLikeTest extends Abstr
                 for (CmisObject o : session
                         .queryObjects("cmis:document", "cmis:name LIKE '" + c + "%'", false,
context).getPage(10)) {
 
-                    if (o.getName() == null) {
+                    if (o.getName() == null || o.getName().length() == 0) {
                         addResult(createResult(
                                 FAILURE,
                                 "Documents without name should not be returned by this query!
Document id: "
@@ -72,7 +72,7 @@ public class QueryLikeTest extends Abstr
                     } else {
                         f = createResult(FAILURE,
                                 "Document name should start with '" + c + "' but the name
is '" + o.getName() + "'");
-                        addResult(assertIsTrue(o.getName().startsWith("" + c), null, f));
+                        addResult(assertEquals(c, Character.toLowerCase(o.getName().charAt(0)),
null, f));
                     }
 
                     if (o.getCreationDate() == null) {



Mime
View raw message