use of org.apache.sling.resourcemerger.impl.picker.MergingResourcePicker in project sling by apache.
the class MergedResourceProviderTestForMergingPicker method setup.
@Before
public void setup() throws Exception {
final MockResourceResolverFactoryOptions options = new MockResourceResolverFactoryOptions();
options.setSearchPaths(new String[] { "/apps/", "/libs/" });
final ResourceResolverFactory factory = new MockResourceResolverFactory(options);
this.resolver = factory.getResourceResolver(null);
MockHelper.create(this.resolver).resource("/apps").resource("a").p(MergedResourceConstants.PN_HIDE_CHILDREN, new String[] { "Z", "x", "y" }).resource("1").p("a", "1").p("b", "2").resource(".2").p(ResourceResolver.PROPERTY_RESOURCE_TYPE, "apps").resource(".3").p("e", "2").p(MergedResourceConstants.PN_HIDE_PROPERTIES, "*").p("b", "x").p("d", "1").resource(".4").p("e", "2").p(MergedResourceConstants.PN_HIDE_PROPERTIES, new String[] { "a", "c" }).p("b", "x").p("d", "1").resource(".X").resource("/apps/b").resource("c").resource("d").resource("e").resource("f").resource("/libs").resource("deleteTest").resource(".mvmTest").p("a", "1").p("b", "2").resource(".a").resource("1").p("a", "5").p("c", "2").resource(".2").p(ResourceResolver.PROPERTY_RESOURCE_TYPE, "libs").resource(".3").p("a", "1").p("b", "2").p("c", "3").resource(".4").p("a", "1").p("b", "2").p("c", "3").resource(".Y").resource(".Z").resource("/libs/a/Y/a").resource("/libs/a/Y/b").resource("/libs/a/Y/c").resource("/libs/b").resource("c").resource("d").resource("e").resource("f").commit();
this.provider = new CRUDMergingResourceProvider("/merged", new MergingResourcePicker(), false);
this.ctx = new BasicResolveContext(resolver);
}
Aggregations