Search in sources :

Example 1 with JaxbHostRegistration

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

the class ServersListProviderTest method setUp.

@Before
public void setUp() throws Exception {
    this.serviceRegistry = EasyMock.createNiceMock(ServiceRegistry.class);
    serverListProvider = new ServersListProvider();
    List<HostRegistration> hosts = new ArrayList<HostRegistration>();
    hosts.add(new JaxbHostRegistration(HOST1, "1.1.1.1", 400000, 8, 8, true, false));
    hosts.add(new JaxbHostRegistration(HOST2, "1.1.1.2", 400000, 8, 8, true, true));
    hosts.add(new JaxbHostRegistration(HOST3, "1.1.1.3", 500000, 2, 8, false, false));
    hosts.add(new JaxbHostRegistration(HOST4, "1.1.1.4", 500000, 6, 8, true, true));
    EasyMock.expect(serviceRegistry.getHostRegistrations()).andReturn(hosts).anyTimes();
    serverListProvider.setServiceRegistry(serviceRegistry);
    serverListProvider.activate(null);
    EasyMock.replay(serviceRegistry);
}
Also used : JaxbHostRegistration(org.opencastproject.serviceregistry.api.JaxbHostRegistration) HostRegistration(org.opencastproject.serviceregistry.api.HostRegistration) ArrayList(java.util.ArrayList) ServiceRegistry(org.opencastproject.serviceregistry.api.ServiceRegistry) JaxbHostRegistration(org.opencastproject.serviceregistry.api.JaxbHostRegistration) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 HostRegistration (org.opencastproject.serviceregistry.api.HostRegistration)1 JaxbHostRegistration (org.opencastproject.serviceregistry.api.JaxbHostRegistration)1 ServiceRegistry (org.opencastproject.serviceregistry.api.ServiceRegistry)1