Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCClient


   * <br />
   * Expectation: Both clients are detached.
   */
  @Test
  public void t01_attachDetach() throws Exception {
    client1 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    Assert.assertEquals("Client1 is detached", false, client1.isAttached());
    client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    Assert.assertEquals("Client2 is detached", false, client2.isAttached());

    client1.attach();
    Assert.assertEquals("Client1 is attached", true, client1.isAttached());
    client2.attach();
View Full Code Here


   * <br />
   * Expectation: Both clients are detached.
   */
  @Test
  public void t02_attachDetach() throws Exception {
    client1 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Client1 is detached", false, client1.isAttached());
    client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Client2 is detached", false, client2.isAttached());

    client1.attach();
    Assert.assertEquals("Client1 is attached", true, client1.isAttached());
    client2.attach();
View Full Code Here

   * <br />
   * Expectation: Both clients are detached.
   */
  @Test
  public void t03_attachDetach() throws Exception {
    client1 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    Assert.assertEquals("Client1 is detached", false, client1.isAttached());
    client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Client2 is detached", false, client2.isAttached());

    client1.attach();
    Assert.assertEquals("Client1 is attached", true, client1.isAttached());
    client2.attach();
View Full Code Here

   * <br />
   * Expectation: Both clients are detached.
   */
  @Test
  public void t05_attachDetach() throws Exception {
    client1 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    Assert.assertEquals("Client1 is detached", false, client1.isAttached());
    client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_HTTP, ConnectionType.NETTY_HTTP);
    Assert.assertEquals("Client2 is detached", false, client2.isAttached());

    int nr = 500;
    for (int i = 0; i < nr; i++) {
      if (((i + 1) % 100) == 0)
View Full Code Here

   * <br />
   * Expectation: Both clients are detached.
   */
  @Test
  public void t06_attachDetach() throws Exception {
    client1 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Client1 is detached", false, client1.isAttached());
    client2 = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Client2 is detached", false, client2.isAttached());

    int nr = 500;
    for (int i = 0; i < nr; i++) {
      if (((i + 1) % 100) == 0)
View Full Code Here

   * Description: Invoke Constructor with Host and Port<br>
   * Expectation: Host and Port was set
   */
  @Test
  public void t01_construtor() {
    client = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, client.getHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, client.getPort());
    Assert.assertNotNull(client);
  }
View Full Code Here

   * Description: Invoke Constructor with Host, Port and connection Type<br>
   * Expectation: Host, Port and connection Type was set
   */
  @Test
  public void t02_construtor() {
    client = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Host not equal", TestConstants.HOST, client.getHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, client.getPort());
    Assert.assertEquals("Connection Type not equal", ConnectionType.NETTY_TCP, client.getConnectionType());
    Assert.assertNotNull(client);
  }
View Full Code Here

   * Description: Invoke Constructor with Host, Port and connection Type<br>
   * Expectation: Host, Port and connection Type was set
   */
  @Test
  public void t03_construtor() {
    client = new SCClient(null, TestConstants.PORT_SC0_TCP);
    Assert.assertEquals("Host not equal", null, client.getHost());
    Assert.assertEquals("Port not equal", TestConstants.PORT_SC0_TCP, client.getPort());
    Assert.assertNotNull(client);
  }
View Full Code Here

   * Description: Invoke Constructor with Host, Port and connection Type<br>
   * Expectation: Host, Port and connection Type was set
   */
  @Test
  public void t04_construtor() {
    client = new SCClient(null, -1);
    Assert.assertEquals("Host not equal", null, client.getHost());
    Assert.assertEquals("Port not equal", -1, client.getPort());
    Assert.assertNotNull(client);
  }
View Full Code Here

   * Description: Invoke setMaxConnections with 0 value<br>
   * Expectation: throws validation exception
   */
  @Test(expected = SCMPValidatorException.class)
  public void t10_maxConnections() throws Exception {
    client = new SCClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP);
    client.setMaxConnections(0);
  }
View Full Code Here

TOP

Related Classes of org.serviceconnector.api.cln.SCClient

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.