jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r753329 - /jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java
Date Fri, 13 Mar 2009 17:55:52 GMT
Author: angela
Date: Fri Mar 13 17:55:47 2009
New Revision: 753329

URL: http://svn.apache.org/viewvc?rev=753329&view=rev
Log:
JCR-2018 Jcr-Remoting: PathNotFoundException if item name ends with .json

> test case

Modified:
    jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java

Modified: jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java?rev=753329&r1=753328&r2=753329&view=diff
==============================================================================
--- jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java
(original)
+++ jackrabbit/sandbox/spi/spi2davex/src/test/java/org/apache/jackrabbit/spi/spi2davex/ExtensionTest.java
Fri Mar 13 17:55:47 2009
@@ -69,10 +69,6 @@
         }
     }
 
-    private void createTestNode() throws RepositoryException {
-        createTestNode(testPath);
-    }
-
     private void createTestNode(String testPath) throws RepositoryException {
         Batch b = rs.createBatch(si, getNodeId("/"));
         String name = Text.getName(testPath);
@@ -133,4 +129,23 @@
             removeTestNode("/test");
         }
     }
+
+     public void testIndex() throws RepositoryException {
+         Name testName = resolver.getQName("test");
+         testPath = "/test";
+         createTestNode("/test");
+         createTestNode("/test");
+
+         NodeInfo nInfo = rs.getNodeInfo(si, getNodeId("/test[2]"));
+         //System.out.println("NodeInfo: " + nInfo.getPath().getNameElement().getName());
+         assertEquals(testName, nInfo.getPath().getNameElement().getName());
+
+         Iterator it = rs.getItemInfos(si, getNodeId("/test[2]"));
+         assertTrue(it.hasNext());
+         nInfo = (NodeInfo) it.next();
+         //System.out.println("ItemInfo: " + nInfo.getPath().getNameElement().getName());
+         assertEquals(testName, nInfo.getPath().getNameElement().getName());
+
+         removeTestNode("/test[2]");
+     }
 }
\ No newline at end of file



Mime
View raw message