Search in sources :

Example 1 with ServiceRegistrationInMemoryImpl

use of org.opencastproject.serviceregistry.api.ServiceRegistrationInMemoryImpl in project opencast by opencast.

the class ServicesListProviderTest method setUp.

@Before
public void setUp() throws Exception {
    serviceRegistry = EasyMock.createNiceMock(ServiceRegistry.class);
    ServiceRegistration sr1 = new ServiceRegistrationInMemoryImpl(SERVICE_TYPE_1, "host1", "service-path-1", true);
    ServiceRegistration sr2 = new ServiceRegistrationInMemoryImpl(SERVICE_TYPE_2, "host1", "service-path-2", false);
    ServiceRegistration sr3 = new ServiceRegistrationInMemoryImpl(SERVICE_TYPE_3, "host1", "service-path-3", true);
    EasyMock.expect(serviceRegistry.getServiceRegistrations()).andReturn(Arrays.asList(sr1, sr2, sr3)).anyTimes();
    servicesListProvider = new ServicesListProvider();
    servicesListProvider.setServiceRegistry(serviceRegistry);
    servicesListProvider.activate(null);
    servicesQuery = new ServicesListQuery();
    EasyMock.replay(serviceRegistry);
}
Also used : ServiceRegistrationInMemoryImpl(org.opencastproject.serviceregistry.api.ServiceRegistrationInMemoryImpl) ServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry) ServicesListQuery(org.opencastproject.index.service.resources.list.query.ServicesListQuery) ServiceRegistration(org.opencastproject.serviceregistry.api.ServiceRegistration) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 ServicesListQuery (org.opencastproject.index.service.resources.list.query.ServicesListQuery)1 ServiceRegistration (org.opencastproject.serviceregistry.api.ServiceRegistration)1 ServiceRegistrationInMemoryImpl (org.opencastproject.serviceregistry.api.ServiceRegistrationInMemoryImpl)1 ServiceRegistry (org.opencastproject.serviceregistry.api.ServiceRegistry)1