Examples of TestChildCfg


Examples of org.nasutekds.server.admin.TestChildCfg

      // delete and change listeners respectively in order to trigger
      // the constraint call-backs.
      TestParentCfg parent = getParent("test parent 1");
      parent.addTestChildDeleteListener(dl);

      TestChildCfg child = parent.getTestChild("test child 7");
      child.addChangeListener(cl);

      // Now attempt to delete the referenced connection handler.
      // This should fail.
      try {
        deleteConnectionHandler();
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

      // delete and change listeners respectively in order to trigger
      // the constraint call-backs.
      TestParentCfg parent = getParent("test parent 1");
      parent.addTestChildDeleteListener(dl);

      TestChildCfg child = parent.getTestChild("test child 7");
      child.addChangeListener(cl);

      // Now attempt to disable the referenced connection handler.
      // This should fail.
      try {
        RootCfgClient root = TestCaseUtils.getRootConfiguration();
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    MockConstraint constraint = new MockConstraint(true, false);

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");

      TestCfg.addConstraint(constraint);
      ChangeListener listener = new ChangeListener();           
      child.addChangeListener(listener);

      // Now modify it.
      String[] changes = new String[] {
          "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    MockConstraint constraint = new MockConstraint(false, true);

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");

      TestCfg.addConstraint(constraint);
      ChangeListener listener = new ChangeListener();
      child.addChangeListener(listener);

      // Now modify it.
      String[] changes = new String[] {
          "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    TestParentCfg parent = getParent("test parent 1");

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");
      ChangeListener listener = new ChangeListener();
      child.addChangeListener(listener);

      // Now modify it.
      String[] changes = new String[] {
          "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
          "replace: ds-cfg-base-dn",
          "ds-cfg-base-dn: dc=new value 1,dc=com",
          "ds-cfg-base-dn: dc=new value 2,dc=com",
          "-",
          "replace: ds-cfg-group-dn",
          "ds-cfg-group-dn: dc=new value 3,dc=com",
          "ds-cfg-group-dn: dc=new value 4,dc=com"
      };
      TestCaseUtils.applyModifications(true, changes);

      // Make sure that the change listener was notified and the
      // modified child contains the correct values.
      child = listener.getChild("test child 1");

      Assert.assertEquals(child.getMandatoryClassProperty(),
          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
          DirectoryServer.getAttributeType("description"));
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
          "dc=new value 3,dc=com", "dc=new value 4,dc=com");
    } finally {
      deleteSubtree("cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
    }
  }
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    TestParentCfg parent = getParent("test parent 1");

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");
      ChangeListener listener = new ChangeListener();
      child.addChangeListener(listener);

      // Now modify it.
      String[] changes = new String[] {
          "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
          "replace: ds-cfg-base-dn",
          "ds-cfg-base-dn: dc=new value 1,dc=com",
          "ds-cfg-base-dn: dc=new value 2,dc=com"
      };
      TestCaseUtils.applyModifications(true, changes);

      // Make sure that the change listener was notified and the
      // modified child contains the correct values.
      child = listener.getChild("test child 1");

      Assert.assertEquals(child.getMandatoryClassProperty(),
          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
          DirectoryServer.getAttributeType("description"));
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
    } finally {
      deleteSubtree("cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
    }
  }
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    TestParentCfg parent = getParent("test parent 1");

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");
      ChangeListener listener = new ChangeListener();
      child.addChangeListener(listener);

      // Now modify it.
      String[] changes = new String[] {
          "dn: cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
          "replace: ds-cfg-group-dn",
          "ds-cfg-group-dn: dc=new value 1,dc=com",
          "ds-cfg-group-dn: dc=new value 2,dc=com"
      };
      TestCaseUtils.applyModifications(true, changes);

      // Make sure that the change listener was notified and the
      // modified child contains the correct values.
      child = listener.getChild("test child 1");

      Assert.assertEquals(child.getMandatoryClassProperty(),
          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
          DirectoryServer.getAttributeType("description"));
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
          "dc=domain1,dc=com", "dc=domain2,dc=com", "dc=domain3,dc=com");
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
    } finally {
      deleteSubtree("cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");
    }
  }
View Full Code Here

Examples of org.nasutekds.server.admin.TestChildCfg

    TestParentCfg parent = getParent("test parent 1");

    try {
      // Add the entry.
      TestCaseUtils.addEntry(TEST_CHILD_1);
      TestChildCfg child = parent.getTestChild("test child 1");
      ChangeListener listener = new ChangeListener();
      child.addChangeListener(listener);

      // Now modify the parent.
      String[] changes = new String[] {
          "dn: cn=test parent 1,cn=test parents,cn=config",
          "changetype: modify",
          "replace: ds-cfg-base-dn",
          "ds-cfg-base-dn: dc=new value 1,dc=com",
          "ds-cfg-base-dn: dc=new value 2,dc=com"
      };
      TestCaseUtils.applyModifications(true, changes);

      // Make sure that the change listener was notified and the
      // modified child contains the correct values.
      child = listener.getChild("test child 1");

      Assert.assertEquals(child.getMandatoryClassProperty(),
          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      Assert.assertEquals(child.getMandatoryReadOnlyAttributeTypeProperty(),
          DirectoryServer.getAttributeType("description"));
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty1(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
      assertDNSetEquals(child.getOptionalMultiValuedDNProperty2(),
          "dc=new value 1,dc=com", "dc=new value 2,dc=com");
    } finally {
      deleteSubtree("cn=test child 1,cn=test children,cn=test parent 1,cn=test parents,cn=config");

      // Undo the modifications.
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.