Package org.serviceconnector.api

Examples of org.serviceconnector.api.SCSubscribeMessage


   * Expectation: throws SCMPValidatorException (contains "=")
   */
  @Test(expected = SCMPValidatorException.class)
  public void t06_subscribeWrongservice() throws Exception {
    publishService = client.newPublishService("service = gaga");
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage();
    subMsgRequest.setMask(TestConstants.mask);
    SCSubscribeMessage subMsgResponse = null;
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
  }
View Full Code Here


   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t08_subscribeNullService() throws Exception {
    publishService = client.newPublishService(null);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(" ");
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t10_subscribeWrongServiceType() throws Exception {
    publishService = client.newPublishService(TestConstants.filServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(" ");
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t12_subscribeNonExistingService() throws Exception {
    publishService = client.newPublishService("gaga");
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(" ");
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t13_subscribeWrongServiceType() throws Exception {
    publishService = client.newPublishService(TestConstants.sesServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(" ");
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
View Full Code Here

   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t15_subscribeInvalidCallback() throws Exception {
    publishService = client.newPublishService(TestConstants.filServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(" ");
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    subMsgResponse = publishService.subscribe(subMsgRequest, null);
  }
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t17_subscribeEmptySessionInfo() throws Exception {
    publishService = client.newPublishService(TestConstants.filServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(TestConstants.mask);
    subMsgRequest.setSessionInfo("");
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
  }
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t18_subscribeBlankSessionInfo() throws Exception {
    publishService = client.newPublishService(TestConstants.filServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(TestConstants.mask);
    subMsgRequest.setSessionInfo(" ");
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
  }
View Full Code Here

   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t19_subscribeSessionInfoTooLong() throws Exception {
    publishService = client.newPublishService(TestConstants.filServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(TestConstants.mask);
    subMsgRequest.setSessionInfo(TestConstants.stringLength257);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
  }
View Full Code Here

   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t20_subscribeNullMask() throws Exception {
    publishService = client.newPublishService(TestConstants.pubServiceName1);
    SCSubscribeMessage subMsgRequest = new SCSubscribeMessage(TestConstants.pangram);
    SCSubscribeMessage subMsgResponse = null;
    subMsgRequest.setMask(null);
    subMsgRequest.setSessionInfo(TestConstants.doNothingCmd);
    subMsgRequest.setNoDataIntervalSeconds(100);
    msgCallback = new MsgCallback(publishService);
    subMsgResponse = publishService.subscribe(subMsgRequest, msgCallback);
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.SCSubscribeMessage

Copyright © 2018 www.massapicom. 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.