jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mreut...@apache.org
Subject svn commit: r787952 - /jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
Date Wed, 24 Jun 2009 09:18:40 GMT
Author: mreutegg
Date: Wed Jun 24 09:18:39 2009
New Revision: 787952

URL: http://svn.apache.org/viewvc?rev=787952&view=rev
Log:
JCR-2085: test case (TCK) maintenance for JCR 2.0
- fix broken security test

Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java?rev=787952&r1=787951&r2=787952&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/core/security/user/NodeResolverTest.java
Wed Jun 24 09:18:39 2009
@@ -186,11 +186,12 @@
             NodeResolver nr = createNodeResolver(currentUser.getNode().getSession());
 
             NodeIterator result = nr.findNodes(propName, "blub", UserConstants.NT_REP_USER,
false);
-            assertTrue(result.getSize() == 1);
-            assertTrue(result.nextNode().isSame(currentUser.getNode()));
+            assertTrue("expected result", result.hasNext());
+            assertEquals(currentUser.getNode().getPath(), result.nextNode().getPath());
+            assertFalse("expected no more results", result.hasNext());
 
             result = nr.findNodes(propName, "blub", UserConstants.NT_REP_AUTHORIZABLE, false);
-            assertTrue(result.getSize() > 1);
+            assertTrue(getSize(result) > 1);
 
         } finally {
             currentUser.removeProperty(propertyName1);



Mime
View raw message