use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.
the class CXFEndpointProviderTest method addServerWithJAXRSBindingGiven.
@Test
public void addServerWithJAXRSBindingGiven() throws Exception {
Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, JAXRS_BINDING_ID, SOAP_HTTP_TRANSPORT_ID);
CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
assertEquals(JAXRS, epp.getBinding());
}
use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.
the class CXFEndpointProviderTest method addServerWithSOAP12BindingGiven.
@Test
public void addServerWithSOAP12BindingGiven() throws Exception {
Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, SOAP12_BINDING_ID, SOAP_HTTP_TRANSPORT_ID);
CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
assertEquals(SOAP12, epp.getBinding());
}
use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.
the class CXFEndpointProviderTest method addServerWithUnknownTransportGiven.
@Test
public void addServerWithUnknownTransportGiven() throws Exception {
Server server = createServerStub(SERVICE_QNAME_2, ENDPOINT_1, SOAP11_BINDING_ID, "unknown");
CXFEndpointProvider epp = new CXFEndpointProvider(server, ENDPOINT_1, PROPERTIES);
assertEquals(TransportType.OTHER, epp.getTransport());
}
use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.
the class CXFTestStubs method createServerStub.
public static Server createServerStub(Endpoint endpoint) {
Server server = EasyMock.createNiceMock(Server.class);
expect(server.getEndpoint()).andStubReturn(endpoint);
EasyMock.replay(server);
return server;
}
use of org.apache.cxf.endpoint.Server in project tesb-rt-se by Talend.
the class LocatorRegistrarTest method startListenForServer.
@Test
public void startListenForServer() throws Exception {
Capture<ServerLifeCycleListener> slclCapture = addServerLifeCycleManager(bus1);
addBusLifeCycleManager(bus1);
List<Server> servers = Collections.emptyList();
addRegisteredServers(bus1, servers);
sl.register(CXF_ENDPOINT_1);
replayAll();
LocatorRegistrar locatorRegistrar = new LocatorRegistrar();
locatorRegistrar.setServiceLocator(sl);
locatorRegistrar.startListenForServers(bus1);
ServerLifeCycleListener listener = slclCapture.getValue();
listener.startServer(SERVER_1);
verifyAll();
}
Aggregations