This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to annotated tag org.apache.sling.testing.sling-mock-1.6.0 in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 07c66509ad47a4331918a5ca461e3037b3d99ada Author: Stefan Seifert <[email protected]> AuthorDate: Tue Sep 8 16:10:12 2015 +0000 SLING-5007 add unit test to explicitly test root path child listing in sling-mock as well git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1701830 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 2 +- .../resource/AbstractSlingCrudResourceResolverTest.java | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index be9a4c1..0d23971 100644 --- a/pom.xml +++ b/pom.xml @@ -57,7 +57,7 @@ <dependency> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId> - <version>1.1.8</version> + <version>1.1.9-SNAPSHOT</version> <scope>compile</scope> </dependency> diff --git a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java index a3d2411..b840b0f 100644 --- a/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java +++ b/src/test/java/org/apache/sling/testing/mock/sling/resource/AbstractSlingCrudResourceResolverTest.java @@ -47,6 +47,7 @@ import org.junit.Test; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; +import com.google.common.collect.Lists; /** * Implements simple write and read resource and values test. Sling CRUD API is @@ -209,6 +210,19 @@ public abstract class AbstractSlingCrudResourceResolverTest { } @Test + public void testListChildren_RootNode() throws IOException { + Resource resource1 = resourceResolver.getResource("/"); + + List<Resource> children = Lists.newArrayList(resource1.listChildren()); + assertEquals(1, children.size()); + assertEquals(getTestRootResource().getName(), children.get(0).getName()); + + children = Lists.newArrayList(resource1.getChildren()); + assertEquals(1, children.size()); + assertEquals(getTestRootResource().getName(), children.get(0).getName()); + } + + @Test public void testBinaryData() throws IOException { Resource resource1 = this.resourceResolver.getResource(getTestRootResource().getPath() + "/node1"); -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
