use of org.omg.CORBA.ServerRequest in project cxf by apache.
the class CorbaServerConduitTest method testBuildRequestResultException.
@Test
public void testBuildRequestResultException() {
NVList list = orb.create_list(0);
CorbaServerConduit conduit = setupCorbaServerConduit(false);
CorbaMessage msg = control.createMock(CorbaMessage.class);
Exchange exchange = control.createMock(Exchange.class);
ServerRequest request = control.createMock(ServerRequest.class);
EasyMock.expect(msg.getExchange()).andReturn(exchange);
EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
EasyMock.expect(exchange.isOneWay()).andReturn(false);
CorbaMessage inMsg = EasyMock.createMock(CorbaMessage.class);
EasyMock.expect(msg.getExchange()).andReturn(exchange);
EasyMock.expect(exchange.getInMessage()).andReturn(inMsg);
EasyMock.expect(inMsg.getList()).andReturn(list);
QName objName = new QName("object");
QName objIdlType = new QName(CorbaConstants.NU_WSDL_CORBA, "short", CorbaConstants.NP_WSDL_CORBA);
TypeCode objTypeCode = orb.get_primitive_tc(TCKind.tk_short);
CorbaPrimitiveHandler obj = new CorbaPrimitiveHandler(objName, objIdlType, objTypeCode, null);
CorbaStreamable exception = new CorbaStreamableImpl(obj, objName);
EasyMock.expect(msg.getStreamableException()).andReturn(exception);
EasyMock.expect(msg.getStreamableException()).andReturn(exception);
control.replay();
conduit.buildRequestResult(msg);
control.verify();
}
use of org.omg.CORBA.ServerRequest in project cxf by apache.
the class CorbaServerConduitTest method testBuildRequestResult.
@Test
public void testBuildRequestResult() {
NVList list = orb.create_list(0);
CorbaServerConduit conduit = setupCorbaServerConduit(false);
CorbaMessage msg = control.createMock(CorbaMessage.class);
Exchange exchange = control.createMock(Exchange.class);
ServerRequest request = control.createMock(ServerRequest.class);
EasyMock.expect(msg.getExchange()).andReturn(exchange);
EasyMock.expect(exchange.get(ServerRequest.class)).andReturn(request);
EasyMock.expect(exchange.isOneWay()).andReturn(false);
CorbaMessage inMsg = EasyMock.createMock(CorbaMessage.class);
EasyMock.expect(msg.getExchange()).andReturn(exchange);
EasyMock.expect(exchange.getInMessage()).andReturn(inMsg);
EasyMock.expect(inMsg.getList()).andReturn(list);
EasyMock.expect(msg.getStreamableException()).andReturn(null);
EasyMock.expect(msg.getStreamableArguments()).andReturn(null);
EasyMock.expect(msg.getStreamableReturn()).andReturn(null);
control.replay();
conduit.buildRequestResult(msg);
control.verify();
}
Aggregations