kwin commented on code in PR #2079:
URL: https://github.com/apache/jackrabbit-oak/pull/2079#discussion_r1957125115


##########
oak-jcr/src/test/java/org/apache/jackrabbit/oak/jcr/session/JackrabbitSessionTest.java:
##########
@@ -81,6 +81,30 @@ public void testGetParentOrNullImplMismatch() {
             // success
         }
     }
-    
-    
+
+    public void testGetExpandedName() throws RepositoryException {
+        // empty namespace uri
+        assertEquals("{}testroot", s.getExpandedName(testRootNode));
+        // global namespace uri
+        s.getWorkspace().getNamespaceRegistry().registerNamespace("foo", 
"urn:foo");
+        Node n = testRootNode.addNode("foo:bar");
+        assertEquals("{urn:foo}bar", s.getExpandedName(n));
+        // now remap namespace uri
+        s.setNamespacePrefix("foo", "http://www.foo.com";);
+        assertEquals("{http://www.foo.com}bar";, s.getExpandedName(n));
+        // use special namespace uri
+        n = testRootNode.addNode("rep:bar");
+        assertEquals("{internal}bar", s.getExpandedName(n));
+    }
+
+    public void testGetExpandedPath() throws RepositoryException {

Review Comment:
   I cannot come up with a test case triggering RepositoryException as all oak 
names have a mapping right now!



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: oak-dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to