Search in sources :

Example 1 with MockHelper

use of org.apache.sling.testing.resourceresolver.MockHelper in project sling by apache.

the class KryoContentSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    resourceResolver = new MockResourceResolverFactory().getResourceResolver(null);
    MockHelper helper = MockHelper.create(resourceResolver).resource("/libs").p("prop", "value").resource("sub").p("sub", "hello").resource(".sameLevel").resource("/apps").p("foo", "baa");
    helper.commit();
}
Also used : MockHelper(org.apache.sling.testing.resourceresolver.MockHelper) MockResourceResolverFactory(org.apache.sling.testing.resourceresolver.MockResourceResolverFactory) Before(org.junit.Before)

Example 2 with MockHelper

use of org.apache.sling.testing.resourceresolver.MockHelper in project sling by apache.

the class AvroContentSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    resourceResolver = new MockResourceResolverFactory().getResourceResolver(null);
    MockHelper helper = MockHelper.create(resourceResolver).resource("/libs").p("prop", "value").resource("sub").p("sub", "hello").resource(".sameLevel").resource("/apps").p("foo", "baa");
    helper.commit();
}
Also used : MockHelper(org.apache.sling.testing.resourceresolver.MockHelper) MockResourceResolverFactory(org.apache.sling.testing.resourceresolver.MockResourceResolverFactory) Before(org.junit.Before)

Example 3 with MockHelper

use of org.apache.sling.testing.resourceresolver.MockHelper in project sling by apache.

the class AbstractJcrEventTriggerTest method setUp.

@Before
public void setUp() throws Exception {
    rrf = new MockResourceResolverFactory();
    ResourceResolver resourceResolver = rrf.getResourceResolver(null);
    MockHelper helper = MockHelper.create(resourceResolver).resource("/a").resource("b").resource("c").resource("d").resource("e").resource("f").resource("g").p("foo", true).resource(".h").p("foo", false);
    helper.commit();
}
Also used : ResourceResolver(org.apache.sling.api.resource.ResourceResolver) MockHelper(org.apache.sling.testing.resourceresolver.MockHelper) MockResourceResolverFactory(org.apache.sling.testing.resourceresolver.MockResourceResolverFactory) Before(org.junit.Before)

Example 4 with MockHelper

use of org.apache.sling.testing.resourceresolver.MockHelper in project sling by apache.

the class FileVaultContentSerializerTest method setUp.

@Before
public void setUp() throws Exception {
    ResourceResolver resourceResolver = new MockResourceResolverFactory().getResourceResolver(null);
    MockHelper helper = MockHelper.create(resourceResolver).resource("/libs").p("prop", "value").resource("sub").p("sub", "hello").resource(".sameLevel").resource("/apps").p("foo", "baa");
    helper.commit();
}
Also used : ResourceResolver(org.apache.sling.api.resource.ResourceResolver) MockHelper(org.apache.sling.testing.resourceresolver.MockHelper) MockResourceResolverFactory(org.apache.sling.testing.resourceresolver.MockResourceResolverFactory) Before(org.junit.Before)

Aggregations

MockHelper (org.apache.sling.testing.resourceresolver.MockHelper)4 MockResourceResolverFactory (org.apache.sling.testing.resourceresolver.MockResourceResolverFactory)4 Before (org.junit.Before)4 ResourceResolver (org.apache.sling.api.resource.ResourceResolver)2