Fix tests after replacing CommonSchemaElements.getPrimaryName()
| | |
| | | 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. |
| | |
| | | */ |
| | | package org.opends.server.types; |
| | | |
| | | import org.forgerock.opendj.ldap.schema.AttributeType; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Collection; |
| | | import java.util.Collections; |
| | |
| | | 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; |
| | |
| | | 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"); |
| | | } |
| | | |
| | | |