Package org.nasutekds.server.admin

Examples of org.nasutekds.server.admin.TestChildCfgClient


        "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
    c.importLDIF(TEST_LDIF);
    c.addExpectedModification("ds-cfg-base-dn");
    ManagementContext ctx = LDAPManagementContext.createFromContext(c);
    TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
    TestChildCfgClient child = parent.getTestChild("test child 2");
    child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
    child.commit();
    Assert.assertTrue(c.isEntryModified());
  }
View Full Code Here


          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      c.addExpectedAttribute("ds-cfg-attribute-type", "description");

      ManagementContext ctx = LDAPManagementContext.createFromContext(c);
      TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
      TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn
          .getInstance(), "test child new", null);
      child.setMandatoryBooleanProperty(true);
      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer
          .getAttributeType("description"));
      child.commit();

      c.assertEntryIsCreated();
    } finally {
      // Clean up.
      TestCfg.removeConstraint(constraint);
View Full Code Here

          "org.nasutekds.server.extensions.UserDefinedVirtualAttributeProvider");
      c.addExpectedAttribute("ds-cfg-attribute-type", "description");

      ManagementContext ctx = LDAPManagementContext.createFromContext(c);
      TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
      TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn
          .getInstance(), "test child new", null);
      child.setMandatoryBooleanProperty(true);
      child.setMandatoryReadOnlyAttributeTypeProperty(DirectoryServer
          .getAttributeType("description"));
      child.commit();
      Assert.fail("The add constraint failed to prevent creation of the managed object");
    } finally {
      // Clean up.
      TestCfg.removeConstraint(constraint);
    }
View Full Code Here

          "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
      c.importLDIF(TEST_LDIF);
      c.addExpectedModification("ds-cfg-base-dn");
      ManagementContext ctx = LDAPManagementContext.createFromContext(c);
      TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
      TestChildCfgClient child = parent.getTestChild("test child 2");
      child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
      child.commit();
      Assert.assertTrue(c.isEntryModified());
    } finally {
      // Clean up.
      TestCfg.removeConstraint(constraint);
    }
View Full Code Here

          "cn=test child 2,cn=test children,cn=test parent 1,cn=test parents,cn=config");
      c.importLDIF(TEST_LDIF);
      c.addExpectedModification("ds-cfg-base-dn");
      ManagementContext ctx = LDAPManagementContext.createFromContext(c);
      TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
      TestChildCfgClient child = parent.getTestChild("test child 2");
      child.setOptionalMultiValuedDNProperty1(Collections.<DN> emptySet());
      child.commit();
      Assert
          .fail("The modify constraint failed to prevent modification of the managed object");
    } finally {
      // Clean up.
      TestCfg.removeConstraint(constraint);
View Full Code Here

TOP

Related Classes of org.nasutekds.server.admin.TestChildCfgClient

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.