Search in sources :

Example 1 with ServiceRegistryHttpInvokerServiceExporter

use of org.opennms.core.spring.web.ServiceRegistryHttpInvokerServiceExporter in project opennms by OpenNMS.

the class HttpRemotingWebAppIT method test.

@Test
public void test() throws Exception {
    WebApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(servletContext);
    assertTrue(context.containsBean("serviceRegistry"));
    assertTrue(context.containsBean("serviceRegistryExporter"));
    ServiceRegistry registry = context.getBean("serviceRegistry", ServiceRegistry.class);
    ServiceRegistryHttpInvokerServiceExporter exporter = context.getBean("serviceRegistryExporter", ServiceRegistryHttpInvokerServiceExporter.class);
    assertEquals(exporter.getServiceRegistry(), registry);
    assertTrue(exporter.getServiceRegistry() == registry);
}
Also used : ServiceRegistryHttpInvokerServiceExporter(org.opennms.core.spring.web.ServiceRegistryHttpInvokerServiceExporter) ServiceRegistry(org.opennms.core.soa.ServiceRegistry) WebApplicationContext(org.springframework.web.context.WebApplicationContext) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 ServiceRegistry (org.opennms.core.soa.ServiceRegistry)1 ServiceRegistryHttpInvokerServiceExporter (org.opennms.core.spring.web.ServiceRegistryHttpInvokerServiceExporter)1 WebApplicationContext (org.springframework.web.context.WebApplicationContext)1