Package org.apache.sling.models.testmodels.classes

Examples of org.apache.sling.models.testmodels.classes.RequestOSGiModel


        SlingHttpServletRequest request = mock(SlingHttpServletRequest.class);
        when(request.getAttribute(SlingBindings.class.getName())).thenReturn(bindings);

        when(helper.getServices(ServiceInterface.class, null)).thenReturn(new ServiceInterface[] { service });

        RequestOSGiModel model = factory.getAdapter(request, RequestOSGiModel.class);
        assertNotNull(model);
        assertNotNull(model.getService());
        assertEquals(service, model.getService());

        verify(bundleContext).registerService(eq(Runnable.class.getName()), eq(factory), any(Dictionary.class));
        verify(bundleContext).addBundleListener(any(BundleListener.class));
        verify(bundleContext).registerService(eq(Object.class.getName()), any(Object.class), any(Dictionary.class));
        verify(bundleContext).getBundles();
View Full Code Here

TOP

Related Classes of org.apache.sling.models.testmodels.classes.RequestOSGiModel

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.