bdelacretaz commented on a change in pull request #17:
URL: 
https://github.com/apache/sling-org-apache-sling-servlets-resolver/pull/17#discussion_r655207027



##########
File path: 
src/test/java/org/apache/sling/servlets/resolver/internal/helper/LocationIteratorTest.java
##########
@@ -62,62 +66,88 @@ public void testSearchPathEmpty() {
     }
 
     public void testSearchPath1Element() {
-        String root0 = "/apps";
-        resourceResolver.setSearchPath(root0);
+        String root0 = "/apps/";
+        resourceResolverOptions.setSearchPaths(new String[] {
+                root0
+        });
 
         final Resource r = request.getResource();
         LocationIterator li = getLocationIterator(r.getResourceType(),
                 r.getResourceSuperType());
 
         // 1. /apps/foo/bar
         assertTrue(li.hasNext());
-        assertEquals(root0 + "/" + resourceTypePath, li.next());
+        assertEquals(root0 + resourceTypePath, li.next());

Review comment:
       I'm curious. why does this slash need to go away in all tests?

##########
File path: 
src/test/java/org/apache/sling/servlets/resolver/internal/helper/LocationIteratorTest.java
##########
@@ -62,62 +66,88 @@ public void testSearchPathEmpty() {
     }
 
     public void testSearchPath1Element() {
-        String root0 = "/apps";
-        resourceResolver.setSearchPath(root0);
+        String root0 = "/apps/";
+        resourceResolverOptions.setSearchPaths(new String[] {
+                root0
+        });
 
         final Resource r = request.getResource();
         LocationIterator li = getLocationIterator(r.getResourceType(),
                 r.getResourceSuperType());
 
         // 1. /apps/foo/bar
         assertTrue(li.hasNext());
-        assertEquals(root0 + "/" + resourceTypePath, li.next());
+        assertEquals(root0 + resourceTypePath, li.next());

Review comment:
       Ok, thank you for clarifying!




-- 
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to