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

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


        when(bundleContext.getServiceReferences(ServiceInterface.class.getName(), null)).thenReturn(
                new ServiceReference[] { ref1, ref2 });

        Resource res = mock(Resource.class);

        ListOSGiModel model = factory.getAdapter(res, ListOSGiModel.class);
        assertNotNull(model);
        assertNotNull(model.getServices());
        assertEquals(2, model.getServices().size());
        assertEquals(service1, model.getServices().get(0));
        assertEquals(service2, model.getServices().get(1));

        verifyNoMoreInteractions(res);
    }
View Full Code Here

TOP

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

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.