From b7b304994dd037ced0df2d5d04c1aa4d41c6bb72 Mon Sep 17 00:00:00 2001
From: sin <sin@localhost>
Date: Wed, 17 Dec 2008 19:25:45 +0000
Subject: [PATCH] Integerated first part of the Fix for Issue# 262:Plugin for Collation/Internationalization
---
opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java b/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
index 7ee1b7d..7b51bb0 100644
--- a/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
+++ b/opends/tests/unit-tests-testng/src/server/org/opends/server/controls/MatchedValuesControlTest.java
@@ -29,13 +29,14 @@
import java.util.ArrayList;
import java.util.List;
+import org.opends.server.api.MatchingRuleFactory;
import org.opends.server.api.MatchingRule;
import org.opends.server.core.DirectoryServer;
import org.opends.server.protocols.asn1.ASN1Element;
import org.opends.server.protocols.asn1.ASN1OctetString;
-import org.opends.server.schema.BooleanEqualityMatchingRule;
-import org.opends.server.schema.DistinguishedNameEqualityMatchingRule;
-import org.opends.server.schema.IntegerEqualityMatchingRule;
+import org.opends.server.schema.BooleanEqualityMatchingRuleFactory;
+import org.opends.server.schema.DistinguishedNameEqualityMatchingRuleFactory;
+import org.opends.server.schema.IntegerEqualityMatchingRuleFactory;
import org.opends.server.types.AttributeType;
import org.opends.server.types.AttributeValue;
import org.opends.server.types.ByteString;
@@ -853,14 +854,23 @@
}
@DataProvider(name = "extensibleMatchFilterData")
- public Object[][] createExtensibleMatchFilterData()
+ public Object[][] createExtensibleMatchFilterData() 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", new BooleanEqualityMatchingRule(), "description" },
- { "objectclass", new IntegerEqualityMatchingRule() ,"top" },
- { "fakeobjecttype", new DistinguishedNameEqualityMatchingRule(), "fakevalue" }, };
+ { "description", booleanEquality, "description" },
+ { "objectclass", integerEquality ,"top" },
+ { "fakeobjecttype", distinguishedEquality, "fakevalue" }, };
}
/**
--
Gitblit v1.10.0