Package org.serviceconnector.api.cln

Examples of org.serviceconnector.api.cln.SCMgmtClient


   * Description: check non-existing service<br>
   * Expectation: passes
   */
  @Test
  public void t01_checkNonexistingService() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertFalse("Service is existing ", client.isServiceEnabled("notExistingService"));
  }
View Full Code Here


   * Description: enable non-existing service<br>
   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t02_enableNonexistingService() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    client.enableService("notExistingService");
  }
View Full Code Here

   * Description: disable non-existing service<br>
   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t03_disableNonexistingService() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    client.disableService("notExistingService");
  }
View Full Code Here

   * Description: check service without attach<br>
   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t04_checkServiceNoAttach() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    Assert.assertEquals("Enabled ", true, client.isServiceEnabled(TestConstants.sesServiceName1));
  }
View Full Code Here

   * Description: check default service state<br>
   * Expectation: service is enabled.
   */
  @Test
  public void t05_checkDefaultState() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertTrue("Disabled ", client.isServiceEnabled(TestConstants.sesServiceName1));
    client.detach();
  }
View Full Code Here

   * Description: disable service without attach<br>
   * Expectation: throws SCServiceException
   */
  @Test(expected = SCServiceException.class)
  public void t06_disableServiceNoAttach() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.disableService(TestConstants.sesServiceName1);
  }
View Full Code Here

   * Description: disable and enable service<br>
   * Expectation: service is enabled.
   */
  @Test
  public void t07_disableEnable() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertTrue("Disabled ", client.isServiceEnabled(TestConstants.sesServiceName1));
    client.disableService(TestConstants.sesServiceName1);
    Assert.assertFalse("Enabled ", client.isServiceEnabled(TestConstants.sesServiceName1));
    client.enableService(TestConstants.sesServiceName1);
View Full Code Here

   * Description: enable / disable service twice<br>
   * Expectation: stays enabled / disabled
   */
  @Test
  public void t08_enableDisableTwice() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    Assert.assertTrue("Disabled ", client.isServiceEnabled(TestConstants.sesServiceName1));
    client.disableService(TestConstants.sesServiceName1);
    client.disableService(TestConstants.sesServiceName1);
    Assert.assertFalse("Enabled ", client.isServiceEnabled(TestConstants.sesServiceName1));
View Full Code Here

   * Description: enable / disable service 1000 times<br>
   * Expectation: stays enabled / disabled
   */
  @Test
  public void t09_enableDdisable1000times() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    int nr = 1000;
    for (int i = 0; i < nr; i++) {
      if (((i + 1) % 100) == 0)
        testLogger.info("Enable/disable nr. " + (i + 1) + "...");
View Full Code Here

   * Description: enable / disable cascaded service 1000 times<br>
   * Expectation: passes
   */
  @Test
  public void t15_enableDisableCascadedService() throws Exception {
    client = new SCMgmtClient(TestConstants.HOST, TestConstants.PORT_SC0_TCP, ConnectionType.NETTY_TCP);
    client.attach();
    client.disableService(TestConstants.sesServiceName1Casc);
    Assert.assertFalse("Enabled ", client.isServiceEnabled(TestConstants.sesServiceName1Casc));
    client.enableService(TestConstants.sesServiceName1Casc);
    Assert.assertTrue("Disabled ", client.isServiceEnabled(TestConstants.sesServiceName1Casc));
View Full Code Here

TOP

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

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.