From 3d4c0acccda6e62b23f248d75c1cc6721fc20bdf Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 07 Jun 2016 13:51:21 +0000
Subject: [PATCH] OPENDJ-3037 inlined DirectoryServer.getAttributeType(String)

---
 opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java |   16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java b/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
index c55fd90..cefa1b5 100644
--- a/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
+++ b/opendj-server-legacy/src/test/java/org/opends/server/schema/GenericSchemaTestCase.java
@@ -16,6 +16,9 @@
  */
 package org.opends.server.schema;
 
+import static org.forgerock.opendj.ldap.schema.CoreSchema.*;
+import static org.opends.server.util.ServerConstants.*;
+
 import java.io.File;
 import java.util.List;
 import java.util.StringTokenizer;
@@ -24,8 +27,8 @@
 import org.forgerock.opendj.ldap.ByteString;
 import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.forgerock.opendj.ldap.schema.MatchingRule;
-import org.forgerock.opendj.ldap.schema.ObjectClass;
 import org.forgerock.opendj.ldap.schema.NameForm;
+import org.forgerock.opendj.ldap.schema.ObjectClass;
 import org.forgerock.opendj.ldap.schema.Syntax;
 import org.opends.server.TestCaseUtils;
 import org.opends.server.core.DirectoryServer;
@@ -37,9 +40,6 @@
 import org.testng.annotations.BeforeClass;
 import org.testng.annotations.Test;
 
-import static org.opends.server.util.ServerConstants.*;
-import static org.testng.Assert.*;
-
 /** This class defines a set of generic tests that may be used to examine the server schema. */
 public class GenericSchemaTestCase
        extends SchemaTestCase
@@ -163,9 +163,7 @@
         continue;
       }
 
-      AttributeType attrType = DirectoryServer.getAttributeType("attributetypes");
-      assertNotNull(attrType);
-      List<Attribute> attrList = e.getAttribute(attrType);
+      List<Attribute> attrList = e.getAttribute(getAttributeTypesAttributeType());
       if (attrList.isEmpty())
       {
         // No attribute types in the schema file.  This is OK.
@@ -305,9 +303,7 @@
         continue;
       }
 
-      AttributeType attrType = DirectoryServer.getAttributeType("nameforms");
-      assertNotNull(attrType);
-      List<Attribute> attrList = e.getAttribute(attrType);
+      List<Attribute> attrList = e.getAttribute(getNameFormsAttributeType());
       if (attrList.isEmpty())
       {
         // No attribute types in the schema file.  This is OK.

--
Gitblit v1.10.0