mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
11.24.2016 3043e29e69d862a5a88a499366eb20faf2f58b2f
Fix tests after replacing CommonSchemaElements.getPrimaryName()
2 files modified
39 ■■■■■ changed files
opendj-server-legacy/src/test/java/org/opends/server/types/TestCommonSchemaElements.java 34 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/types/TestObjectClass.java 5 ●●●●● patch | view | raw | blame | history
opendj-server-legacy/src/test/java/org/opends/server/types/TestCommonSchemaElements.java
@@ -658,40 +658,6 @@
    Assert.assertEquals(d.getOID(), "1.2.3");
  }
  /**
   * Check that the {@link CommonSchemaElements#getPrimaryName()}
   * method returns <code>null</code> when there is no primary name.
   *
   * @throws Exception
   *           If the test failed unexpectedly.
   */
  @Test
  public final void testGetPrimaryNameDefault() throws Exception {
    SchemaDefinitionBuilder builder = getBuilder(null, "1.2.3");
    CommonSchemaElements d = builder.getInstance();
    Assert.assertNull(d.getNameOrOID());
  }
  /**
   * Check that the {@link CommonSchemaElements#getPrimaryName()}
   * method.
   *
   * @throws Exception
   *           If the test failed unexpectedly.
   */
  @Test
  public final void testGetPrimaryName() throws Exception {
    SchemaDefinitionBuilder builder = getBuilder("testType", "1.2.3");
    CommonSchemaElements d = builder.getInstance();
    Assert.assertEquals(d.getNameOrOID(), "testType");
  }
  /**
   * Check that the {@link CommonSchemaElements#getSchemaFile()}
   * method returns <code>null</code> when there is no schema file.
opendj-server-legacy/src/test/java/org/opends/server/types/TestObjectClass.java
@@ -16,8 +16,6 @@
 */
package org.opends.server.types;
import org.forgerock.opendj.ldap.schema.AttributeType;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
@@ -27,6 +25,7 @@
import java.util.Map;
import java.util.Set;
import org.forgerock.opendj.ldap.schema.AttributeType;
import org.forgerock.opendj.ldap.schema.ObjectClassType;
import org.forgerock.util.Utils;
import org.opends.server.core.DirectoryServer;
@@ -371,7 +370,7 @@
    ObjectClass type = new ObjectClass(definition, null, null, "1.2.3", null,
        null, null, null, null, false, null);
    Assert.assertNull(type.getNameOrOID());
    Assert.assertEquals(type.getNameOrOID(), "1.2.3");
  }