From 8b3cd28204e15e0a98ce038b355f100cd7c44e3c Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <capponi.nicolas@gmail.com>
Date: Thu, 28 Jan 2016 08:28:20 +0000
Subject: [PATCH] OPENDJ-1632 (PR-201) Migrate AttributeType in one shot
---
opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java | 38 ++++++++++++--------------------------
1 files changed, 12 insertions(+), 26 deletions(-)
diff --git a/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java b/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
index 59727dd..001c1eb 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/controls/MatchedValuesControlTest.java
@@ -23,7 +23,7 @@
*
* Copyright 2006-2008 Sun Microsystems, Inc.
* Portions Copyright 2013-2014 Manuel Gaupp
- * Portions Copyright 2014-2015 ForgeRock AS
+ * Portions Copyright 2014-2016 ForgeRock AS
*/
package org.opends.server.controls;
@@ -31,13 +31,10 @@
import java.util.ArrayList;
import java.util.List;
-import org.opends.server.api.MatchingRuleFactory;
+import org.forgerock.opendj.ldap.schema.CoreSchema;
import org.forgerock.opendj.ldap.schema.MatchingRule;
import org.opends.server.core.DirectoryServer;
-import org.opends.server.schema.BooleanEqualityMatchingRuleFactory;
-import org.opends.server.schema.DistinguishedNameEqualityMatchingRuleFactory;
-import org.opends.server.schema.IntegerEqualityMatchingRuleFactory;
-import org.opends.server.types.*;
+import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.ByteString;
import org.forgerock.opendj.ldap.ByteStringBuilder;
import org.forgerock.opendj.io.ASN1Writer;
@@ -48,11 +45,9 @@
import static org.testng.Assert.*;
-/**
- * Test MatchedValuesControl.
- */
-public class MatchedValuesControlTest
- extends ControlsTestCase
+/** Test MatchedValuesControl. */
+@SuppressWarnings("javadoc")
+public class MatchedValuesControlTest extends ControlsTestCase
{
/**
@@ -673,24 +668,15 @@
}
}
- @DataProvider(name = "extensibleMatchFilterData")
- public Object[][] createExtensibleMatchFilterData() throws Exception
+ @DataProvider
+ public Object[][] extensibleMatchFilterData() throws Exception
{
- MatchingRuleFactory<?> factory = new BooleanEqualityMatchingRuleFactory();
- factory.initializeMatchingRule(null);
- MatchingRule booleanEquality = factory.getMatchingRules().iterator().next();
- factory = new IntegerEqualityMatchingRuleFactory();
- factory.initializeMatchingRule(null);
- MatchingRule integerEquality = factory.getMatchingRules().iterator().next();
- factory = new DistinguishedNameEqualityMatchingRuleFactory();
- factory.initializeMatchingRule(null);
- MatchingRule distinguishedEquality = factory.getMatchingRules().iterator().next();
-
return new Object[][]
{
- { "description", booleanEquality, "description" },
- { "objectclass", integerEquality ,"top" },
- { "fakeobjecttype", distinguishedEquality, "fakevalue" }, };
+ { "description", CoreSchema.getBooleanMatchingRule(), "description" },
+ { "objectclass", CoreSchema.getIntegerMatchingRule(), "top" },
+ { "fakeobjecttype", CoreSchema.getDistinguishedNameMatchingRule(), "fakevalue" },
+ };
}
/**
--
Gitblit v1.10.0