Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


   * Description:  register session server with service name = " "<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t204_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(" ");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here


   * Description:  register session server with service name = "gaga"<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t205_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer("gaga");
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with callback = null<br>
   * Expectation:  throws SCMPValidatorException
   */
  @Test (expected = SCMPValidatorException.class)
  public void t206_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = null;
    sessionServer.register(1, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with 1 session and 1 connection<br>
   * Expectation:  passes
   */
  @Test
  public void t207_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 1, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer.isRegistered());
View Full Code Here

   * Description:  register session server with 10 sessions and 10 connections<br>
   * Expectation:  passes
   */
  @Test
  public void t208_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(10, 10, cbk);
    Assert.assertEquals("SessionServer is not registered", true, sessionServer.isRegistered());
View Full Code Here

   * Description:  register session server with 1 session and 10 connections<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t209_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 10, cbk);
  }
View Full Code Here

   * Description:  register session server with 10 session and 20 connections<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t210_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(10, 20, cbk);
  }
View Full Code Here

   * Description:  register session server with 0 session and 1 connection<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t211_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(0, 1, cbk);
  }
View Full Code Here

   * Description:  register session server with 1 session and 0 connection<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t212_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(1, 0, cbk);
  }
View Full Code Here

   * Description:  register session server with 0 session and 0 connection<br>
   * Expectation:  throws SCServiceException
   */
  @Test (expected = SCServiceException.class)
  public void t213_register() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, TestConstants.PORT_SES_SRV_HTTP, ConnectionType.NETTY_HTTP);
    server.startListener();
    sessionServer = server.newSessionServer(TestConstants.sesServiceName1);
    SCSessionServerCallback cbk = new SesSrvCallback(sessionServer);
    sessionServer.register(0, 0, cbk);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.srv.SCServer

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.