Examples of SCMPClnExecuteCall


Examples of org.serviceconnector.call.SCMPClnExecuteCall

   * Description: execute small request - large response both uncompressed<br>
   * Expectation: passes
   */
  @Test
  public void t40_SmallRequestLargeResponseUncompressed() throws Exception {
    SCMPClnExecuteCall clnExecuteCall = new SCMPClnExecuteCall(this.requester, TestConstants.sesServerName1, this.sessionId);
    clnExecuteCall.setMessageInfo(TestConstants.largeResponseCmd);
    clnExecuteCall.setRequestBody("test body");
    clnExecuteCall.setCompressed(false);
    TestCallback cbk = new TestCallback();
    clnExecuteCall.invoke(cbk, 3000);
    SCMPMessage scmpReply = cbk.getMessageSync(3000);

    String expectedResponse = TestUtil.getLargeString();
    Assert.assertEquals(expectedResponse.length() + "", scmpReply.getBodyLength() + "");
    Assert.assertEquals(expectedResponse, scmpReply.getBody());
    Assert.assertEquals(SCMPBodyType.TEXT.getValue(), scmpReply.getHeader(SCMPHeaderAttributeKey.BODY_TYPE));
    Assert.assertEquals(SCMPMsgType.CLN_EXECUTE.getValue(), scmpReply.getMessageType());
    String serviceName = clnExecuteCall.getRequest().getServiceName();
    String sessionId = clnExecuteCall.getRequest().getSessionId();
    Assert.assertEquals(serviceName, scmpReply.getServiceName());
    Assert.assertEquals(sessionId, scmpReply.getSessionId());
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.