Search in sources :

Example 1 with DescriptorMergeStrategyResolverChain

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);
}
Also used : DescriptorMergeStrategyResolver(org.craftercms.core.xml.mergers.DescriptorMergeStrategyResolver) DescriptorMergeStrategyResolverChain(org.craftercms.core.xml.mergers.impl.resolvers.DescriptorMergeStrategyResolverChain)

Aggregations

DescriptorMergeStrategyResolver (org.craftercms.core.xml.mergers.DescriptorMergeStrategyResolver)1 DescriptorMergeStrategyResolverChain (org.craftercms.core.xml.mergers.impl.resolvers.DescriptorMergeStrategyResolverChain)1