Package org.apache.sling.discovery.impl.setup

Examples of org.apache.sling.discovery.impl.setup.MockedResourceResolver


    public DefaultInstanceDescriptionImpl constructInstanceDescription(
            DefaultClusterViewImpl clusterView, boolean isLeader,
            boolean isOwn, String theSlingId, Map<String, String> properties)
            throws Exception {

        Resource res = new MockedResource(new MockedResourceResolver(),
                "/foo/bar", "nt:unstructured");

        return new EstablishedInstanceDescription(clusterView, res, theSlingId,
                isLeader, isOwn);
    }
View Full Code Here


  /**
   * Some code is taken from http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/serversidetests/WriteableResourcesTest.java
   */
  @Before
  public void setup() throws Exception {
    resolver = new MockedResourceResolver();
    assertNotNull("Expecting non-null ResourceResolver", resolver);
    final Resource root = resolver.getResource("/");
    assertNotNull("Expecting non-null root Resource", root);
    final String path = getClass().getSimpleName() + "_" + System.currentTimeMillis();
    testRoot = resolver.create(root, path, null);
View Full Code Here

    /**
     * Some code is taken from http://svn.apache.org/repos/asf/sling/trunk/launchpad/test-services/src/main/java/org/apache/sling/launchpad/testservices/serversidetests/WriteableResourcesTest.java
     */
    @Before
    public void setup() throws Exception {
        resolver = new MockedResourceResolver();
        assertNotNull("Expecting non-null ResourceResolver", resolver);
        final Resource root = resolver.getResource("/");
        assertNotNull("Expecting non-null root Resource", root);
        final String path = getClass().getSimpleName() + "_" + System.currentTimeMillis();
        testRoot = resolver.create(root, path, null);
View Full Code Here

TOP

Related Classes of org.apache.sling.discovery.impl.setup.MockedResourceResolver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.