From 13ccff83abc20da3b0587e88398d7cc643dd3d6d Mon Sep 17 00:00:00 2001
From: Nicolas Capponi <nicolas.capponi@forgerock.com>
Date: Thu, 16 Oct 2014 15:56:02 +0000
Subject: [PATCH] OPENDJ-1592 Retrieve time-based matching rules by OID in tests

---
 opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java    |    3 +--
 opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java |    3 +--
 opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java  |    2 +-
 3 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java
index d2e62df..f3545d7 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/PartialDateAndTimeMatchingRuleTestCase.java
@@ -179,7 +179,7 @@
     /** {@inheritDoc} */
     @Override
     protected MatchingRule getRule() {
-        return CoreSchema.getPartialDateAndTimeMatchingRule();
+        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.MR_PARTIAL_DATE_AND_TIME_OID);
     }
 
     @Test
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java
index 1c513b3..ef7bda7 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeGreaterThanMatchingRuleTest.java
@@ -35,7 +35,6 @@
 import org.forgerock.opendj.ldap.schema.AbstractSubstringMatchingRuleImplTest.FakeIndexQueryFactory;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-
 import org.forgerock.util.time.TimeService;
 
 import static org.fest.assertions.Assertions.*;
@@ -113,7 +112,7 @@
     /** {@inheritDoc} */
     @Override
     protected MatchingRule getRule() {
-        return CoreSchema.getRelativeTimeGreaterThanMatchingRule();
+        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.OMR_RELATIVE_TIME_GREATER_THAN_OID);
     }
 
     @Test
diff --git a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java
index 177887a..4ef175e 100644
--- a/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java
+++ b/opendj-core/src/test/java/org/forgerock/opendj/ldap/schema/RelativeTimeLessThanMatchingRuleTest.java
@@ -35,7 +35,6 @@
 import org.forgerock.opendj.ldap.schema.AbstractSubstringMatchingRuleImplTest.FakeIndexQueryFactory;
 import org.testng.annotations.DataProvider;
 import org.testng.annotations.Test;
-
 import org.forgerock.util.time.TimeService;
 
 import static org.fest.assertions.Assertions.*;
@@ -114,7 +113,7 @@
     /** {@inheritDoc} */
     @Override
     protected MatchingRule getRule() {
-        return CoreSchema.getRelativeTimeLessThanMatchingRule();
+        return CoreSchema.getInstance().getMatchingRule(SchemaConstants.OMR_RELATIVE_TIME_LESS_THAN_OID);
     }
 
     @Test

--
Gitblit v1.10.0