use of org.craftercms.core.xml.mergers.impl.resolvers.DescriptorMergeStrategyResolverChain in project core by craftercms.
the class DescriptorMergeStrategyResolverChainTest method setUpTestResolverChain.
private void setUpTestResolverChain() {
DescriptorMergeStrategyResolver resolver1 = mock(DescriptorMergeStrategyResolver.class);
when(resolver1.getStrategy(eq(DESCRIPTOR_URL1), Matchers.<Document>anyObject())).thenReturn(strategy1);
DescriptorMergeStrategyResolver resolver2 = mock(DescriptorMergeStrategyResolver.class);
when(resolver2.getStrategy(eq(DESCRIPTOR_URL2), Matchers.<Document>anyObject())).thenReturn(strategy2);
resolverChain = new DescriptorMergeStrategyResolverChain();
resolverChain.setResolvers(Arrays.asList(resolver1, resolver2));
resolverChain.setDefaultStrategy(defaultStrategy);
}
Aggregations