Package org.serviceconnector.api.srv

Examples of org.serviceconnector.api.srv.SCServer


   * Description: Invoke SCServer constructor with host, port=Integer.MIN_VALUE and listener port. <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t03_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, Integer.MIN_VALUE, TestConstants.PORT_SES_SRV_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", Integer.MIN_VALUE, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SES_SRV_TCP, server.getListenerPort());
    Assert.assertEquals("Default ConnectionType not set", ConnectionType.DEFAULT_SERVER_CONNECTION_TYPE, server
        .getConnectionType());
View Full Code Here


   * Description: Invoke SCServer constructor with host, port and listener port=Integer.MIN_VALUE. <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t04_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, Integer.MIN_VALUE);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", Integer.MIN_VALUE, server.getListenerPort());
    Assert.assertEquals("Default ConnectionType not set", ConnectionType.DEFAULT_SERVER_CONNECTION_TYPE, server
        .getConnectionType());
View Full Code Here

   * Description: Invoke SCServer constructor with host, port, listener port and connection type. <br>
   * Expectation: throws SCMPCommunicationException
   */
  @Test
  public void t05_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP,
        ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SES_SRV_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
View Full Code Here

   * Description: SCServer with host, port, listener port and connection type=null. <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t06_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SES_SRV_TCP, null);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SES_SRV_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", null, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   * Description: start listener to the same port <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t07_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   * Description: SCServer with non-existing host <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t08_constructor() throws Exception {
    server = new SCServer("gaga", TestConstants.PORT_SC0_TCP, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", "gaga", server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   * Description: SCServer with empty host <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t09_constructor() throws Exception {
    server = new SCServer(" ", TestConstants.PORT_SC0_TCP, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", " ", server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   * Description: SCServer with host = null <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t10_constructor() throws Exception {
    server = new SCServer(null, TestConstants.PORT_SC0_TCP, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", null, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   * Description: SCServer with port = 0 <br>
   * Expectation: throws SCMPValidatorException
   */
  @Test(expected = SCMPValidatorException.class)
  public void t11_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, 0, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", 0, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
View Full Code Here

   *
   * @throws Exception the exception
   */
  @Test
  public void t12_constructor() throws Exception {
    server = new SCServer(TestConstants.HOST, TestConstants.PORT_MIN, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, server.getSCHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_MIN, server.getSCPort());
    Assert.assertEquals("Listener Port not equal", TestConstants.PORT_SC0_TCP, server.getListenerPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, server.getConnectionType());
    Assert.assertNotNull(server);
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.