Search in sources :

Example 1 with NamespaceHandlerRegistry

use of org.apache.aries.blueprint.container.NamespaceHandlerRegistry in project aries by apache.

the class ParserProxyTest method getMockParserServiceProxy.

public static ParserProxy getMockParserServiceProxy() {
    BundleContext mockCtx = Skeleton.newMock(new BundleContextMock(), BundleContext.class);
    NamespaceHandlerRegistry nhri = new NamespaceHandlerRegistryImpl(mockCtx);
    ParserService parserService = new ParserServiceImpl(nhri);
    mockCtx.registerService(ParserService.class.getName(), parserService, new Hashtable<String, String>());
    ParserProxyImpl parserProxyService = new ParserProxyImpl();
    parserProxyService.setParserService(parserService);
    parserProxyService.setBundleContext(mockCtx);
    parserProxyService.setModellingManager(new ModellingManagerImpl());
    return parserProxyService;
}
Also used : ParserServiceImpl(org.apache.aries.blueprint.container.ParserServiceImpl) BundleContextMock(org.apache.aries.mocks.BundleContextMock) NamespaceHandlerRegistry(org.apache.aries.blueprint.container.NamespaceHandlerRegistry) BundleContext(org.osgi.framework.BundleContext) NamespaceHandlerRegistryImpl(org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl) ParserService(org.apache.aries.blueprint.services.ParserService)

Aggregations

NamespaceHandlerRegistry (org.apache.aries.blueprint.container.NamespaceHandlerRegistry)1 ParserServiceImpl (org.apache.aries.blueprint.container.ParserServiceImpl)1 NamespaceHandlerRegistryImpl (org.apache.aries.blueprint.namespace.NamespaceHandlerRegistryImpl)1 ParserService (org.apache.aries.blueprint.services.ParserService)1 BundleContextMock (org.apache.aries.mocks.BundleContextMock)1 BundleContext (org.osgi.framework.BundleContext)1