use of org.onehippo.cms7.crisp.mock.resource.MockJdomResourceResolverAdapter in project hippo by NHS-digital-website.
the class SubscriptionResourceTest method setUp.
@Before
public void setUp() {
final Map<String, ResourceResolver> resourceResolverMap = new HashMap<>();
resourceResolverMap.put("govDeliveryApi", new MockJdomResourceResolverAdapter() {
@Override
public Resource resolve(String absPath, Map<String, Object> pathVariables, ExchangeHint exchangeHint) throws ResourceException {
return urlToResource(SubscriptionResourceTest.class.getResource("/subscriber-output.xml"));
}
});
final ResourceServiceBroker mockBroker = new MockResourceServiceBroker(resourceResolverMap);
MockCrispHstServices.setDefaultResourceServiceBroker(mockBroker);
}
Aggregations