jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r752415 - /jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java
Date Wed, 11 Mar 2009 10:10:32 GMT
Author: angela
Date: Wed Mar 11 10:10:32 2009
New Revision: 752415

URL: http://svn.apache.org/viewvc?rev=752415&view=rev
Log:
remove spi dependency, minor improvements

Modified:
    jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java

Modified: jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java?rev=752415&r1=752414&r2=752415&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr2spi/src/test/java/org/apache/jackrabbit/jcr2spi/AccessByRelativePathTest.java
Wed Mar 11 10:10:32 2009
@@ -16,12 +16,8 @@
  */
 package org.apache.jackrabbit.jcr2spi;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
-import org.apache.jackrabbit.spi.PathFactory;
-import org.apache.jackrabbit.spi.commons.name.PathFactoryImpl;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Node;
@@ -34,11 +30,8 @@
  */
 public class AccessByRelativePathTest extends AbstractJCRTest {
 
-    private static Logger log = LoggerFactory.getLogger(AccessByRelativePathTest.class);
-
-    private static final PathFactory P_FACTORY = PathFactoryImpl.getInstance();
-    private static String DOT = P_FACTORY.getCurrentElement().getName().getLocalName();
-    private static String DOTDOT = P_FACTORY.getParentElement().getName().getLocalName();
+    private static String DOT = ".";
+    private static String DOTDOT = "..";
 
     /**
      * <code>Node.hasNode(".") </code> applied to the root node must return
@@ -201,8 +194,10 @@
      * @throws RepositoryException
      */
     public void testGetNodeDotDotSlashName() throws RepositoryException, NotExecutableException
{
-        // TODO: NotExecutableException if sns exist for testRootNode
         String otherRelPath = DOTDOT + "/" + testRootNode.getName();
+        if (testRootNode.getIndex() > 1) {
+            otherRelPath = otherRelPath + "[" + testRootNode.getIndex() + "]";
+        }
         assertTrue(testRootNode.isSame(testRootNode.getNode(otherRelPath)));
     }
 



Mime
View raw message