jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r647190 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java
Date Fri, 11 Apr 2008 15:04:26 GMT
Author: mreutegg
Date: Fri Apr 11 08:04:19 2008
New Revision: 647190

URL: http://svn.apache.org/viewvc?rev=647190&view=rev
Log:
JCR-1104: JSR 283 support (work in progress)

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java?rev=647190&r1=647189&r2=647190&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/query/qom/NodeNameTest.java
Fri Apr 11 08:04:19 2008
@@ -49,6 +49,16 @@
         checkResult(q.execute(), new Node[]{node1});
     }
 
+    public void testStringLiteralInvalidName() throws RepositoryException {
+        Value literal = superuser.getValueFactory().createValue("[" + nodeName1);
+        try {
+            createQuery(OPERATOR_EQUAL_TO, literal).execute();
+            fail("NodeName comparison with STRING that cannot be converted to NAME must fail
with InvalidQueryException");
+        } catch (InvalidQueryException e) {
+            // expected
+        }
+    }
+
     public void testBinaryLiteral() throws RepositoryException {
         Value literal = superuser.getValueFactory().createValue(
                 nodeName1, PropertyType.BINARY);



Mime
View raw message