From 2737523b4f973f89fd2d8861fa6dcbc1e46e3154 Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Thu, 02 Jan 2014 09:33:43 +0000
Subject: [PATCH] Checkpoint commit for OPENDJ-1235 : Migrate configuration framework

---
 opendj-admin/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java |   21 ++++++++++++++-------
 1 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java b/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
index 4f5b61d..9a4d727 100644
--- a/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
+++ b/opendj-admin/src/test/java/org/opends/server/admin/client/ldap/AggregationClientTest.java
@@ -34,6 +34,8 @@
 import org.forgerock.opendj.admin.client.RootCfgClient;
 import org.opends.server.admin.AdminTestCase;
 import org.opends.server.admin.IllegalPropertyValueStringException;
+import org.opends.server.admin.LDAPProfile;
+import org.opends.server.admin.PropertyDefinitionsOptions;
 import org.opends.server.admin.PropertyException;
 import org.opends.server.admin.TestCfg;
 import org.opends.server.admin.TestChildCfgClient;
@@ -154,7 +156,6 @@
 
     @BeforeClass
     public void setUp() throws Exception {
-        disableClassValidationForProperties();
         TestCfg.setUp();
     }
 
@@ -177,7 +178,8 @@
     public void testAggregationEmpty() throws Exception {
         MockLDAPConnection c = new MockLDAPConnection();
         c.importLDIF(TEST_LDIF);
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
         TestChildCfgClient child = parent.getTestChild("test child 1");
         assertSetEquals(child.getAggregationProperty(), new String[0]);
@@ -194,7 +196,8 @@
     public void testAggregationSingle() throws Exception {
         MockLDAPConnection c = new MockLDAPConnection();
         c.importLDIF(TEST_LDIF);
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
         TestChildCfgClient child = parent.getTestChild("test child 2");
 
@@ -215,7 +218,8 @@
     public void testAggregationMultiple() throws Exception {
         MockLDAPConnection c = new MockLDAPConnection();
         c.importLDIF(TEST_LDIF);
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
         TestChildCfgClient child = parent.getTestChild("test child 3");
         assertSetEquals(child.getAggregationProperty(), "LDAPS Connection Handler", "LDAP Connection Handler");
@@ -232,7 +236,8 @@
     public void testAggregationBadBaseDN() throws Exception {
         MockLDAPConnection c = new MockLDAPConnection();
         c.importLDIF(TEST_LDIF);
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
 
         try {
@@ -275,7 +280,8 @@
         c.addExpectedAttribute("ds-cfg-rotation-policy",
                 "cn=LDAP Connection Handler,cn=connection handlers, cn=config");
 
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
         TestChildCfgClient child = parent.createTestChild(TestChildCfgDefn.getInstance(), "test child new", null);
         child.setMandatoryBooleanProperty(true);
@@ -301,7 +307,8 @@
         c.addExpectedModification("ds-cfg-rotation-policy",
             "cn=HTTP Connection Handler,cn=connection handlers, cn=config",
             "cn=JMX Connection Handler,cn=connection handlers, cn=config");
-        ManagementContext ctx = LDAPManagementContext.createFromContext(c);
+        ManagementContext ctx = LDAPManagementContext.createFromContext(c, LDAPProfile.getInstance(),
+            PropertyDefinitionsOptions.NO_VALIDATION_OPTIONS);
         TestParentCfgClient parent = getTestParent(ctx, "test parent 1");
         TestChildCfgClient child = parent.getTestChild("test child 2");
         child.setAggregationProperty(Arrays.asList("JMX Connection Handler", "HTTP Connection Handler"));

--
Gitblit v1.10.0