You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2009/08/26 08:59:28 UTC
svn commit: r807895 -
/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/
Author: elecharny
Date: Wed Aug 26 06:59:27 2009
New Revision: 807895
URL: http://svn.apache.org/viewvc?rev=807895&view=rev
Log:
Fixed many compilation errors by using the correct methods
Modified:
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -113,7 +113,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( OID ) );
+ assertTrue( service.getRegistries().getAttributeTypeRegistry().contains( OID ) );
assertEquals( getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
}
@@ -128,7 +128,7 @@
getSchemaContext( service ).destroySubcontext( dn );
assertFalse( "attributeType should be removed from the registry after being deleted",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
try
{
@@ -154,7 +154,7 @@
schemaRoot.rename( dn, newdn );
assertFalse( "old attributeType OID should be removed from the registry after being renamed",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
try
{
@@ -165,7 +165,7 @@
{
}
- assertTrue( getAttributeTypeRegistry().hasAttributeType( NEW_OID ) );
+ assertTrue( getAttributeTypeRegistry().contains( NEW_OID ) );
}
@@ -183,7 +183,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "attributeType OID should still be present",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
assertEquals( "attributeType schema should be set to apache not apachemeta",
getAttributeTypeRegistry().getSchemaName( OID ), "apache" );
@@ -204,10 +204,10 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "old attributeType OID should NOT be present",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
assertTrue( "new attributeType OID should be present",
- getAttributeTypeRegistry().hasAttributeType( NEW_OID ) );
+ getAttributeTypeRegistry().contains( NEW_OID ) );
assertEquals( "attributeType with new oid should have schema set to apache NOT apachemeta",
getAttributeTypeRegistry().getSchemaName( NEW_OID ), "apache" );
@@ -234,7 +234,7 @@
getSchemaContext( service ).modifyAttributes( dn, mods );
assertTrue( "attributeType OID should still be present",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
assertEquals( "attributeType schema should be set to apachemeta",
getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
@@ -263,7 +263,7 @@
getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
assertTrue( "attributeType OID should still be present",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
assertEquals( "attributeType schema should be set to apachemeta",
getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
@@ -298,7 +298,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + DEPENDEE_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getAttributeTypeRegistry().hasAttributeType( DEPENDEE_OID ) );
+ assertTrue( getAttributeTypeRegistry().contains( DEPENDEE_OID ) );
assertEquals( getAttributeTypeRegistry().getSchemaName( DEPENDEE_OID ), "apachemeta" );
}
@@ -322,7 +322,7 @@
}
assertTrue( "attributeType should still be in the registry after delete failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -349,7 +349,7 @@
}
assertTrue( "attributeType should still be in the registry after move failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -376,7 +376,7 @@
}
assertTrue( "attributeType should still be in the registry after move failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -402,7 +402,7 @@
}
assertTrue( "attributeType should still be in the registry after rename failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -433,7 +433,7 @@
}
assertTrue( "attributeType should still be in the registry after move failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -459,7 +459,7 @@
}
assertTrue( "attributeType should still be in the registry after move failure",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -483,7 +483,7 @@
getSchemaContext( service ).createSubcontext( dn, attrs );
assertFalse( "adding new attributeType to disabled schema should not register it into the registries",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -502,7 +502,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "attributeType OID should no longer be present",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
}
@@ -516,7 +516,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
assertFalse( "attributeType OID should NOT be present when added to disabled nis schema",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
LdapDN newdn = getAttributeTypeContainer( "apachemeta" );
newdn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
@@ -524,7 +524,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "attributeType OID should be present when moved to enabled schema",
- getAttributeTypeRegistry().hasAttributeType( OID ) );
+ getAttributeTypeRegistry().contains( OID ) );
assertEquals( "attributeType should be in apachemeta schema after move",
getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -26,7 +26,6 @@
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.integ.CiRunner;
import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-import org.apache.directory.server.schema.registries.OidRegistry;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -37,6 +36,7 @@
import org.apache.directory.shared.ldap.schema.LdapSyntax;
import org.apache.directory.shared.ldap.schema.registries.ComparatorRegistry;
import org.apache.directory.shared.ldap.schema.registries.MatchingRuleRegistry;
+import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -107,7 +107,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ assertTrue( getMatchingRuleRegistry().contains( OID ) );
assertEquals( getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
}
@@ -122,7 +122,7 @@
getSchemaContext( service ).destroySubcontext( dn );
assertFalse( "matchingRule should be removed from the registry after being deleted",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
try
{
@@ -147,7 +147,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "old matchingRule OID should be removed from the registry after being renamed",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
try
{
@@ -158,7 +158,7 @@
{
}
- assertTrue( getMatchingRuleRegistry().hasMatchingRule( NEW_OID ) );
+ assertTrue( getMatchingRuleRegistry().contains( NEW_OID ) );
}
@@ -176,7 +176,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "matchingRule OID should still be present",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
assertEquals( "matchingRule schema should be set to apache not apachemeta",
getMatchingRuleRegistry().getSchemaName( OID ), "apache" );
@@ -197,10 +197,10 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "old matchingRule OID should NOT be present",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
assertTrue( "new matchingRule OID should be present",
- getMatchingRuleRegistry().hasMatchingRule( NEW_OID ) );
+ getMatchingRuleRegistry().contains( NEW_OID ) );
assertEquals( "matchingRule with new oid should have schema set to apache NOT apachemeta",
getMatchingRuleRegistry().getSchemaName( NEW_OID ), "apache" );
@@ -227,7 +227,7 @@
getSchemaContext( service ).modifyAttributes( dn, mods );
assertTrue( "matchingRule OID should still be present",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
assertEquals( "matchingRule schema should be set to apachemeta",
getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
@@ -256,7 +256,7 @@
getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
assertTrue( "matchingRule OID should still be present",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
assertEquals( "matchingRule schema should be set to apachemeta",
getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
@@ -407,7 +407,7 @@
}
assertTrue( "matchingRule should still be in the registry after move failure",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
}
@@ -433,7 +433,7 @@
}
assertTrue( "matchingRule should still be in the registry after move failure",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
}
@@ -454,7 +454,7 @@
getSchemaContext( service ).createSubcontext( dn, attrs );
assertFalse( "adding new matchingRule to disabled schema should not register it into the registries",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
}
@@ -473,7 +473,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "matchingRule OID should no longer be present",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
}
@@ -487,7 +487,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
assertFalse( "matchingRule OID should NOT be present when added to disabled nis schema",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
LdapDN newdn = getMatchingRuleContainer( "apachemeta" );
newdn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
@@ -495,7 +495,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "matchingRule OID should be present when moved to enabled schema",
- getMatchingRuleRegistry().hasMatchingRule( OID ) );
+ getMatchingRuleRegistry().contains( OID ) );
assertEquals( "matchingRule should be in apachemeta schema after move",
getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -24,7 +24,6 @@
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.integ.CiRunner;
import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-import org.apache.directory.server.schema.registries.OidRegistry;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -37,6 +36,7 @@
import org.apache.directory.shared.ldap.schema.normalizers.NoOpNormalizer;
import org.apache.directory.shared.ldap.schema.registries.MatchingRuleRegistry;
import org.apache.directory.shared.ldap.schema.registries.NormalizerRegistry;
+import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -119,7 +119,7 @@
{
addObjectClass();
- assertTrue( getObjectClassRegistry().hasObjectClass( OID ) );
+ assertTrue( getObjectClassRegistry().contains( OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
}
@@ -134,7 +134,7 @@
getSchemaContext( service ).destroySubcontext( dn );
assertFalse( "objectClass should be removed from the registry after being deleted",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
//noinspection EmptyCatchBlock
try
@@ -160,7 +160,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "old objectClass OID should be removed from the registry after being renamed",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
//noinspection EmptyCatchBlock
try
@@ -172,7 +172,7 @@
{
}
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
}
@@ -190,7 +190,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "objectClass OID should still be present",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
assertEquals( "objectClass schema should be set to apache not apachemeta",
getObjectClassRegistry().getSchemaName( OID ), "apache" );
@@ -211,10 +211,10 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "old objectClass OID should NOT be present",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
assertTrue( "new objectClass OID should be present",
- getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( "objectClass with new oid should have schema set to apache NOT apachemeta",
getObjectClassRegistry().getSchemaName( NEW_OID ), "apache" );
@@ -241,7 +241,7 @@
getSchemaContext( service ).modifyAttributes( dn, mods );
assertTrue( "objectClass OID should still be present",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
assertEquals( "objectClass schema should be set to apachemeta",
getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
@@ -270,7 +270,7 @@
getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );
assertTrue( "objectClass OID should still be present",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
assertEquals( "objectClass schema should be set to apachemeta",
getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
@@ -303,7 +303,7 @@
dn.add( "m-oid" + "=" + DEPENDEE_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( DEPENDEE_OID ) );
+ assertTrue( getObjectClassRegistry().contains( DEPENDEE_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( DEPENDEE_OID ), "apachemeta" );
}
@@ -327,7 +327,7 @@
}
assertTrue( "objectClass should still be in the registry after delete failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -354,7 +354,7 @@
}
assertTrue( "objectClass should still be in the registry after move failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -381,7 +381,7 @@
}
assertTrue( "ObjectClass should still be in the registry after move failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -407,7 +407,7 @@
}
assertTrue( "objectClass should still be in the registry after rename failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -436,7 +436,7 @@
}
assertTrue( "objectClass should still be in the registry after move failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -462,7 +462,7 @@
}
assertTrue( "objectClass should still be in the registry after move failure",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -491,7 +491,7 @@
addObjectClassToDisabledSchema();
assertFalse( "adding new objectClass to disabled schema should not register it into the registries",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -510,7 +510,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertFalse( "objectClass OID should no longer be present",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
}
@@ -524,7 +524,7 @@
dn.add( "m-oid" + "=" + OID );
assertFalse( "objectClass OID should NOT be present when added to disabled nis schema",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
LdapDN newdn = getObjectClassContainer( "apachemeta" );
newdn.add( "m-oid" + "=" + OID );
@@ -532,7 +532,7 @@
getSchemaContext( service ).rename( dn, newdn );
assertTrue( "objectClass OID should be present when moved to enabled schema",
- getObjectClassRegistry().hasObjectClass( OID ) );
+ getObjectClassRegistry().contains( OID ) );
assertEquals( "objectClass should be in apachemeta schema after move",
getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
@@ -565,7 +565,7 @@
dn.add( "m-oid" + "=" + OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( OID ) );
+ assertTrue( getObjectClassRegistry().contains( OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
}
@@ -672,7 +672,7 @@
dn.add( "m-oid" + "=" + NEW_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
}
@@ -706,7 +706,7 @@
dn.add( "m-oid" + "=" + NEW_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
}
@@ -774,7 +774,7 @@
dn.add( "m-oid" + "=" + NEW_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
}
@@ -807,7 +807,7 @@
dn.add( "m-oid" + "=" + NEW_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
}
@@ -840,7 +840,7 @@
dn.add( "m-oid" + "=" + NEW_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getObjectClassRegistry().hasObjectClass( NEW_OID ) );
+ assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
}
}
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -356,7 +356,7 @@
// double check and make sure an attribute from that schema is
// not in the AttributeTypeRegistry
- assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertFalse( atr.contains( TEST_ATTR_OID ) );
// now enable the test schema
IntegrationUtils.enableSchema( service, "nis" );
@@ -366,7 +366,7 @@
// double check and make sure the test attribute from the
// test schema is now loaded and present within the attr registry
- assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertTrue( atr.contains( TEST_ATTR_OID ) );
}
@@ -386,7 +386,7 @@
// double check and make sure an attribute from that schema is
// not in the AttributeTypeRegistry
- assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertFalse( atr.contains( TEST_ATTR_OID ) );
// now enable the test schema
IntegrationUtils.enableSchema( service, "nis" );
@@ -399,7 +399,7 @@
// double check and make sure the test attribute from the
// test schema is now loaded and present within the attr registry
- assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertTrue( atr.contains( TEST_ATTR_OID ) );
}
@@ -419,7 +419,7 @@
// double check and make sure an attribute from that schema is
// not in the AttributeTypeRegistry
- assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertFalse( atr.contains( TEST_ATTR_OID ) );
// now disable the test schema
IntegrationUtils.disableSchema( service, "nis" );
@@ -435,7 +435,7 @@
// double check and make sure the test attribute from the
// test schema is now loaded and present within the attr registry
- assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertFalse( atr.contains( TEST_ATTR_OID ) );
}
@@ -458,7 +458,7 @@
// double check and make sure an attribute from that schema is
// in the AttributeTypeRegistry
- assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertTrue( atr.contains( TEST_ATTR_OID ) );
// now disable the test schema
IntegrationUtils.disableSchema( service, "samba" );
@@ -469,7 +469,7 @@
// double check and make sure the test attribute from the test
// schema is now NOT loaded and present within the attr registry
- assertFalse( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertFalse( atr.contains( TEST_ATTR_OID ) );
}
@@ -506,7 +506,7 @@
// double check and make sure an attribute from that schema is
// in the AttributeTypeRegistry
- assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertTrue( atr.contains( TEST_ATTR_OID ) );
// now try to disable the test schema which should fail
// since it's dependent, the dummy schema, is enabled
@@ -530,7 +530,7 @@
// double check and make sure the test attribute from the test
// schema is still loaded and present within the attr registry
- assertTrue( atr.hasAttributeType( TEST_ATTR_OID ) );
+ assertTrue( atr.contains( TEST_ATTR_OID ) );
}
@@ -621,12 +621,12 @@
LdapContext schemaRoot = getSchemaContext( service );
IntegrationUtils.enableSchema( service, "samba" );
- assertTrue( getAttributeTypeRegistry().hasAttributeType( "sambaNTPassword" ) );
+ assertTrue( getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
assertEquals( "samba", getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
schemaRoot.rename( "cn=samba", "cn=foo" );
assertNotNull( schemaRoot.lookup( "cn=foo" ) );
- assertTrue( getAttributeTypeRegistry().hasAttributeType( "sambaNTPassword" ) );
+ assertTrue( getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
assertEquals( "foo", getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
//noinspection EmptyCatchBlock
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -24,7 +24,6 @@
import org.apache.directory.server.core.DirectoryService;
import org.apache.directory.server.core.integ.CiRunner;
import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
-import org.apache.directory.server.schema.registries.OidRegistry;
import org.apache.directory.shared.ldap.constants.SchemaConstants;
import org.apache.directory.shared.ldap.exception.LdapInvalidNameException;
import org.apache.directory.shared.ldap.exception.LdapOperationNotSupportedException;
@@ -33,6 +32,7 @@
import org.apache.directory.shared.ldap.schema.LdapSyntax;
import org.apache.directory.shared.ldap.schema.SyntaxChecker;
import org.apache.directory.shared.ldap.schema.registries.LdapSyntaxRegistry;
+import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
import org.apache.directory.shared.ldap.schema.registries.SyntaxCheckerRegistry;
import org.apache.directory.shared.ldap.schema.syntaxChecker.AcceptAllSyntaxChecker;
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Wed Aug 26 06:59:27 2009
@@ -393,7 +393,7 @@
dn.add( MetaSchemaConstants.M_OID_AT + "=" + MR_OID );
getSchemaContext( service ).createSubcontext( dn, attrs );
- assertTrue( getMatchingRuleRegistry().hasMatchingRule( MR_OID ) );
+ assertTrue( getMatchingRuleRegistry().contains( MR_OID ) );
assertEquals( getMatchingRuleRegistry().getSchemaName( MR_OID ), "apachemeta" );
}
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Wed Aug 26 06:59:27 2009
@@ -25,7 +25,7 @@
import static org.apache.directory.server.core.integ.IntegrationUtils.getRootContext;
import static org.apache.directory.server.core.integ.IntegrationUtils.getSchemaContext;
import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescription;
+import org.apache.directory.shared.ldap.schema.AttributeType;
import org.apache.directory.shared.ldap.schema.parsers.AttributeTypeDescriptionSchemaParser;
import static org.junit.Assert.assertEquals;
@@ -200,13 +200,15 @@
Attributes attrs = getSubschemaSubentryAttributes();
Attribute attrTypes = attrs.get( "attributeTypes" );
- AttributeTypeDescription attributeTypeDescription = null;
+ AttributeType attributeType = null;
+
for ( int ii = 0; ii < attrTypes.size(); ii++ )
{
String desc = ( String ) attrTypes.get( ii );
+
if ( desc.indexOf( oid ) != -1 )
{
- attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER
+ attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER
.parseAttributeTypeDescription( desc );
break;
}
@@ -214,12 +216,12 @@
if ( isPresent )
{
- assertNotNull( attributeTypeDescription );
- assertEquals( oid, attributeTypeDescription.getNumericOid() );
+ assertNotNull( attributeType );
+ assertEquals( oid, attributeType.getOid() );
}
else
{
- assertNull( attributeTypeDescription );
+ assertNull( attributeType );
}
// -------------------------------------------------------------------
@@ -254,11 +256,11 @@
if ( isPresent )
{
- assertTrue( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+ assertTrue( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
}
else
{
- assertFalse( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+ assertFalse( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
}
}
}
Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java?rev=807895&r1=807894&r2=807895&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/schema/SubschemaSubentryIT.java Wed Aug 26 06:59:27 2009
@@ -42,7 +42,6 @@
import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescriptionSchemaParser;
import org.apache.directory.shared.ldap.schema.parsers.LdapComparatorDescription;
import org.apache.directory.shared.ldap.schema.parsers.LdapSyntaxDescriptionSchemaParser;
-import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescription;
import org.apache.directory.shared.ldap.schema.parsers.MatchingRuleDescriptionSchemaParser;
import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescription;
import org.apache.directory.shared.ldap.schema.parsers.NormalizerDescriptionSchemaParser;
@@ -1098,7 +1097,7 @@
Attributes attrs = getSubschemaSubentryAttributes();
Attribute attrTypes = attrs.get( "attributeTypes" );
- AttributeTypeDescription attributeTypeDescription = null;
+ AttributeType attributeType = null;
for ( int ii = 0; ii < attrTypes.size(); ii++ )
{
@@ -1106,19 +1105,19 @@
if ( desc.indexOf( oid ) != -1 )
{
- attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+ attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
break;
}
}
if ( isPresent )
{
- assertNotNull( attributeTypeDescription );
- assertEquals( oid, attributeTypeDescription.getNumericOid() );
+ assertNotNull( attributeType );
+ assertEquals( oid, attributeType.getOid() );
}
else
{
- assertNull( attributeTypeDescription );
+ assertNull( attributeType );
}
// -------------------------------------------------------------------
@@ -1154,11 +1153,11 @@
if ( isPresent )
{
- assertTrue( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+ assertTrue( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
}
else
{
- assertFalse( service.getRegistries().getAttributeTypeRegistry().hasAttributeType( oid ) );
+ assertFalse( service.getRegistries().getAttributeTypeRegistry().contains( oid ) );
}
}
@@ -1405,7 +1404,7 @@
Attributes attrs = getSubschemaSubentryAttributes();
Attribute attrTypes = attrs.get( "attributeTypes" );
- AttributeTypeDescription attributeTypeDescription = null;
+ AttributeType attributeType = null;
for ( int ii = 0; ii < attrTypes.size(); ii++ )
{
@@ -1413,12 +1412,12 @@
if ( desc.indexOf( "1.3.6.1.4.1.18060.0.4.0.2.10000" ) != -1 )
{
- attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+ attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
break;
}
}
- assertNull( attributeTypeDescription );
+ assertNull( attributeType );
attrs = getSchemaContext( service ).getAttributes( "m-oid=1.3.6.1.4.1.18060.0.4.0.2.10000,ou=attributeTypes,cn=nis" );
assertNotNull( attrs );
@@ -1428,10 +1427,10 @@
AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
- assertEquals( "name", at.getSuperior().getName() );
+ assertEquals( "name", at.getSup().getName() );
assertEquals( "bogus description", at.getDescription() );
assertEquals( "bogus", at.getName() );
- assertEquals( "bogusName", at.getNamesRef()[1] );
+ assertEquals( "bogusName", at.getNames().get( 1 ) );
assertEquals( true, at.isCanUserModify() );
assertEquals( false, at.isCollective() );
assertEquals( false, at.isObsolete() );
@@ -1459,27 +1458,28 @@
Attributes attrs = getSubschemaSubentryAttributes();
Attribute attrTypes = attrs.get( "attributeTypes" );
- AttributeTypeDescription attributeTypeDescription = null;
+ AttributeType attributeType = null;
for ( int ii = 0; ii < attrTypes.size(); ii++ )
{
String desc = ( String ) attrTypes.get( ii );
+
if ( desc.indexOf( "1.3.6.1.4.1.18060.0.4.0.2.10000" ) != -1 )
{
- attributeTypeDescription = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
+ attributeType = ATTRIBUTE_TYPE_DESCRIPTION_SCHEMA_PARSER.parseAttributeTypeDescription( desc );
break;
}
}
- assertNotNull( attributeTypeDescription );
- assertEquals( true, attributeTypeDescription.isSingleValued() );
- assertEquals( false, attributeTypeDescription.isCollective() );
- assertEquals( false, attributeTypeDescription.isObsolete() );
- assertEquals( true, attributeTypeDescription.isUserModifiable() );
- assertEquals( "bogus description", attributeTypeDescription.getDescription() );
- assertEquals( "bogus", attributeTypeDescription.getNames().get( 0 ) );
- assertEquals( "bogusName", attributeTypeDescription.getNames().get( 1 ) );
- assertEquals( "name", attributeTypeDescription.getSuperType() );
+ assertNotNull( attributeType );
+ assertEquals( true, attributeType.isSingleValue() );
+ assertEquals( false, attributeType.isCollective() );
+ assertEquals( false, attributeType.isObsolete() );
+ assertEquals( true, attributeType.isCanUserModify() );
+ assertEquals( "bogus description", attributeType.getDescription() );
+ assertEquals( "bogus", attributeType.getNames().get( 0 ) );
+ assertEquals( "bogusName", attributeType.getNames().get( 1 ) );
+ assertEquals( "name", attributeType.getSup().getName() );
attrs = getSchemaContext( service ).getAttributes(
"m-oid=1.3.6.1.4.1.18060.0.4.0.2.10000,ou=attributeTypes,cn=nis" );
@@ -1490,10 +1490,10 @@
AttributeType at = factory.getAttributeType( serverEntry, service.getRegistries(), "nis" );
assertEquals( "1.3.6.1.4.1.18060.0.4.0.2.10000", at.getOid() );
- assertEquals( "name", at.getSuperior().getName() );
+ assertEquals( "name", at.getSup().getName() );
assertEquals( "bogus description", at.getDescription() );
- assertEquals( "bogus", at.getNamesRef()[0] );
- assertEquals( "bogusName", at.getNamesRef()[1] );
+ assertEquals( "bogus", at.getNames().get( 0 ) );
+ assertEquals( "bogusName", at.getNames().get( 1 ) );
assertEquals( true, at.isCanUserModify() );
assertEquals( false, at.isCollective() );
assertEquals( false, at.isObsolete() );
@@ -1569,11 +1569,11 @@
if ( isPresent )
{
- assertTrue( service.getRegistries().getObjectClassRegistry().hasObjectClass( oid ) );
+ assertTrue( service.getRegistries().getObjectClassRegistry().contains( oid ) );
}
else
{
- assertFalse( service.getRegistries().getObjectClassRegistry().hasObjectClass( oid ) );
+ assertFalse( service.getRegistries().getObjectClassRegistry().contains( oid ) );
}
}