directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1071728 [4/7] - in /directory: apacheds/branches/m1/core-annotations/src/main/java/org/apache/directory/server/core/factory/ apacheds/branches/m1/core-api/src/main/java/org/apache/directory/server/core/ apacheds/branches/m1/core-api/src/ma...
Date Thu, 17 Feb 2011 17:50:56 GMT
Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/partition/PartitionIT.java Thu Feb 17 17:50:50 2011
@@ -106,7 +106,7 @@ public final class PartitionIT extends A
          */
         HashMap<String, Partition> partitionMap = new HashMap<String, Partition>();
 
-        for ( Partition partition : service.getPartitions() )
+        for ( Partition partition : getService().getPartitions() )
         {
             LOG.debug( "partition id = {}", partition.getId() );
             partitionMap.put( partition.getId(), partition );
@@ -119,7 +119,7 @@ public final class PartitionIT extends A
          * Confirm presence and publishing of foo and bar partitions as 
          * namingContexts as values innamingContexts attribute of the rootDSE
          */
-        LdapContext rootDSE = getRootContext( service );
+        LdapContext rootDSE = getRootContext( getService() );
         Attribute namingContexts = rootDSE.getAttributes( "", new String[]
             { "namingContexts" } ).get( "namingContexts" );
         assertTrue( namingContexts.contains( "dc=foo,dc=com" ) );
@@ -142,7 +142,7 @@ public final class PartitionIT extends A
      */
     public void addLookupDelete( String partitionSuffix ) throws Exception
     {
-        LdapContext rootDSE = getRootContext( service );
+        LdapContext rootDSE = getRootContext( getService() );
         Attributes attrs = new BasicAttributes( "objectClass", "organizationalUnit", true );
         attrs.put( "ou", "people" );
         String entryDn = "ou=people," + partitionSuffix;

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/prefs/PreferencesIT.java Thu Feb 17 17:50:50 2011
@@ -47,7 +47,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testSystemRoot()
     {
-        ServerPreferencesFactory factory = new ServerPreferencesFactory( service );
+        ServerPreferencesFactory factory = new ServerPreferencesFactory( getService() );
         Preferences prefs = factory.systemRoot();
 
         assertNotNull( prefs );
@@ -63,7 +63,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testRoot() throws Exception
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         assertEquals( "sysPrefRoot", prefs.get( "prefNodeName", "not the value" ) );
     }
 
@@ -76,7 +76,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreate() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
 
         testNode.put( "cn", "testNodeValue" );
@@ -92,7 +92,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndSetBoolean() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putBoolean( "cn", false );
         testNode.sync();
@@ -127,7 +127,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndSetDouble() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putDouble( "cn", 3.14 );
         testNode.sync();
@@ -144,7 +144,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndSetFloat() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putFloat( "cn", ( float ) 9.20 );
         testNode.sync();
@@ -161,7 +161,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndSetInt() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putInt( "cn", 345 );
         testNode.sync();
@@ -178,7 +178,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndSetLong() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
         testNode.putLong( "cn", 75449559185447L );
         testNode.sync();
@@ -195,7 +195,7 @@ public class PreferencesIT extends Abstr
     @Test
     public void testCreateAndRemove() throws BackingStoreException
     {
-        ServerSystemPreferences prefs = new ServerSystemPreferences( service );
+        ServerSystemPreferences prefs = new ServerSystemPreferences( getService() );
         Preferences testNode = prefs.node( "testNode" );
 
         testNode.put( "cn", "testNodeValue" );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/AbstractMetaSchemaObjectHandler.java Thu Feb 17 17:50:50 2011
@@ -39,7 +39,7 @@ public abstract class AbstractMetaSchema
     @Before
     public final void init()
     {
-        workingDir = service.getInstanceLayout().getPartitionsDirectory().getAbsolutePath();
+        workingDir = getService().getInstanceLayout().getPartitionsDirectory().getAbsolutePath();
     }
 
 
@@ -52,7 +52,7 @@ public abstract class AbstractMetaSchema
     {
         StringBuilder sb = new StringBuilder();
 
-        sb.append( workingDir ).append( '/' ).append( service.getSchemaService().getSchemaPartition().getId() ).append( '/' ).append( "ou=schema" );
+        sb.append( workingDir ).append( '/' ).append( getService().getSchemaService().getSchemaPartition().getId() ).append( '/' ).append( "ou=schema" );
 
         for ( Rdn rdn : dn )
         {

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaAttributeTypeHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -96,14 +96,14 @@ public class MetaAttributeTypeHandlerIT 
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( "2.5.4.58" ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( "2.5.4.58" ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "2.5.4.58" ) );
-        assertEquals( service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( "2.5.4.58" ), "apachemeta" );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "2.5.4.58" ) );
+        assertEquals( getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( "2.5.4.58" ), "apachemeta" );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -127,14 +127,14 @@ public class MetaAttributeTypeHandlerIT 
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
-        assertEquals( service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+        assertEquals( getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -158,7 +158,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch( NameNotFoundException nnfe )
@@ -167,7 +167,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertFalse( "adding new attributeType to disabled schema should not register it into the registries",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // The added entry must not be present on disk
         assertFalse( isOnDisk( dn ) );
@@ -191,13 +191,13 @@ public class MetaAttributeTypeHandlerIT 
         Dn dn = getAttributeTypeContainer( "nis" );
         dn = dn.add( "m-oid=" + OID );
 
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( "adding new attributeType to disabled schema should not register it into the registries",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // The GlobalOidRegistries must not contain the AT
-        assertFalse( service.getSchemaManager().getGlobalOidRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getGlobalOidRegistry().contains( OID ) );
 
         // The added entry must be present on disk
         assertTrue( isOnDisk( dn ) );
@@ -230,14 +230,14 @@ public class MetaAttributeTypeHandlerIT 
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( "1.3.6.1.4.1.8104.1.1.37" ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( "1.3.6.1.4.1.8104.1.1.37" ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( "1.3.6.1.4.1.8104.1.1.37" ) );
-        assertEquals( service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( "1.3.6.1.4.1.8104.1.1.37" ), "apachemeta" );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( "1.3.6.1.4.1.8104.1.1.37" ) );
+        assertEquals( getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( "1.3.6.1.4.1.8104.1.1.37" ), "apachemeta" );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -255,16 +255,16 @@ public class MetaAttributeTypeHandlerIT 
 
         // Check in Registries
         assertTrue( "attributeType should be removed from the registry after being deleted",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // Check on disk that the added SchemaObject exist
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         // Check in Registries
         assertFalse( "attributeType should be removed from the registry after being deleted",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // Check on disk that the deleted SchemaObject does not exist anymore
         assertFalse( isOnDisk( dn ) );
@@ -287,18 +287,18 @@ public class MetaAttributeTypeHandlerIT 
 
         // Check in Registries
         assertFalse( "attributeType should be removed from the registry after being deleted",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // Check on disk that the added SchemaObject exists
         assertTrue( isOnDisk( dn ) );
 
         // Remove the AT
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         // Check in Registries
         assertFalse( "attributeType should be removed from the registry after being deleted",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
-        assertFalse( service.getSchemaManager().getGlobalOidRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getGlobalOidRegistry().contains( OID ) );
 
         // Check on disk that the deleted SchemaObject does not exist anymore
         assertFalse( isOnDisk( dn ) );
@@ -316,7 +316,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
             fail( "should not be able to delete a attributeType in use" );
         }
         catch( OperationNotSupportedException e )
@@ -324,7 +324,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after delete failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -337,7 +337,7 @@ public class MetaAttributeTypeHandlerIT 
     {
         testAddAttributeTypeToEnabledSchema();
 
-        AttributeType at = service.getSchemaManager().lookupAttributeTypeRegistry( OID );
+        AttributeType at = getService().getSchemaManager().lookupAttributeTypeRegistry( OID );
         assertEquals( at.getDescription(), DESCRIPTION0 );
         assertEquals( at.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
@@ -349,15 +349,15 @@ public class MetaAttributeTypeHandlerIT 
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         attr = new BasicAttribute( "m-syntax", SchemaConstants.DIRECTORY_STRING_SYNTAX );
         mods[1] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "attributeType OID should still be present",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         assertEquals( "attributeType schema should be set to apachemeta",
-            service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
+            getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
 
-        at = service.getSchemaManager().lookupAttributeTypeRegistry( OID );
+        at = getService().getSchemaManager().lookupAttributeTypeRegistry( OID );
         assertEquals( at.getDescription(), DESCRIPTION1 );
         assertEquals( at.getSyntax().getOid(), SchemaConstants.DIRECTORY_STRING_SYNTAX );
     }
@@ -369,7 +369,7 @@ public class MetaAttributeTypeHandlerIT 
     {
         testAddAttributeTypeToEnabledSchema();
 
-        AttributeType at = service.getSchemaManager().lookupAttributeTypeRegistry( OID );
+        AttributeType at = getService().getSchemaManager().lookupAttributeTypeRegistry( OID );
         assertEquals( at.getDescription(), DESCRIPTION0 );
         assertEquals( at.getSyntax().getOid(), SchemaConstants.INTEGER_SYNTAX );
 
@@ -379,15 +379,15 @@ public class MetaAttributeTypeHandlerIT 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
         mods.put( "m-syntax", SchemaConstants.DIRECTORY_STRING_SYNTAX );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "attributeType OID should still be present",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         assertEquals( "attributeType schema should be set to apachemeta",
-            service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
+            getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
 
-        at = service.getSchemaManager().lookupAttributeTypeRegistry( OID );
+        at = getService().getSchemaManager().lookupAttributeTypeRegistry( OID );
         assertEquals( at.getDescription(), DESCRIPTION1 );
         assertEquals( at.getSyntax().getOid(), SchemaConstants.DIRECTORY_STRING_SYNTAX );
     }
@@ -402,7 +402,7 @@ public class MetaAttributeTypeHandlerIT 
     {
         testAddAttributeTypeToEnabledSchema();
 
-        LdapContext schemaRoot = getSchemaContext( service );
+        LdapContext schemaRoot = getSchemaContext( getService() );
         Dn dn = getAttributeTypeContainer( "apachemeta" );
         dn = dn.add( "m-oid=" + OID );
 
@@ -411,12 +411,12 @@ public class MetaAttributeTypeHandlerIT 
         schemaRoot.rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old attributeType OID should be removed from the registry after being renamed",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
-        service.getSchemaManager().getAttributeTypeRegistry().lookup( OID );
+        getService().getSchemaManager().getAttributeTypeRegistry().lookup( OID );
         fail( "attributeType lookup should fail after renaming the attributeType" );
 
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( NEW_OID ) );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( NEW_OID ) );
     }
 
 
@@ -435,7 +435,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename a attributeType in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -444,7 +444,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after rename failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -463,13 +463,13 @@ public class MetaAttributeTypeHandlerIT 
         Dn newdn = getAttributeTypeContainer( "apache" );
         newdn = newdn.add( "m-oid=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
 
         assertTrue( "attributeType OID should still be present",
-                service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+                getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         assertEquals( "attributeType schema should be set to apache not apachemeta",
-            service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apache" );
+            getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apache" );
     }
 
 
@@ -485,16 +485,16 @@ public class MetaAttributeTypeHandlerIT 
         Dn newdn = getAttributeTypeContainer( "apache" );
         newdn = newdn.add( "m-oid=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old attributeType OID should NOT be present",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         assertTrue( "new attributeType OID should be present",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( NEW_OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( NEW_OID ) );
 
         assertEquals( "attributeType with new oid should have schema set to apache NOT apachemeta",
-            service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( NEW_OID ), "apache" );
+            getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( NEW_OID ), "apache" );
     }
 
 
@@ -512,7 +512,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a attributeType up to ou=schema" );
         }
         catch( LdapInvalidDnException e )
@@ -521,7 +521,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after move failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -539,7 +539,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a attributeType into comparators container" );
         }
         catch( LdapInvalidDnException e )
@@ -548,7 +548,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after move failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -565,10 +565,10 @@ public class MetaAttributeTypeHandlerIT 
         Dn newdn = getAttributeTypeContainer( "nis" );
         newdn = newdn.add( "m-oid=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "attributeType OID should no longer be present",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -587,7 +587,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a attributeType in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -596,7 +596,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after move failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -615,7 +615,7 @@ public class MetaAttributeTypeHandlerIT 
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a attributeType in use" );
         }
         catch( LdapUnwillingToPerformException e )
@@ -624,7 +624,7 @@ public class MetaAttributeTypeHandlerIT 
         }
 
         assertTrue( "attributeType should still be in the registry after move failure",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
     }
 
 
@@ -647,10 +647,10 @@ public class MetaAttributeTypeHandlerIT 
 
         Dn dn = getAttributeTypeContainer( "apachemeta" );
         dn = dn.add( "m-oid=" + DEPENDEE_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
-        assertTrue( service.getSchemaManager().getAttributeTypeRegistry().contains( DEPENDEE_OID ) );
-        assertEquals( service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( DEPENDEE_OID ), "apachemeta" );
+        assertTrue( getService().getSchemaManager().getAttributeTypeRegistry().contains( DEPENDEE_OID ) );
+        assertEquals( getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( DEPENDEE_OID ), "apachemeta" );
     }
 
 
@@ -669,18 +669,18 @@ public class MetaAttributeTypeHandlerIT 
         dn.add( "m-oid=" + OID );
 
         assertFalse( "attributeType OID should NOT be present when added to disabled nis schema",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         Dn newdn = getAttributeTypeContainer( "apachemeta" );
         newdn.add( "m-oid=" + OID );
 
-        getSchemaContext( service ).rename( dn, newdn );
+        getSchemaContext( getService() ).rename( dn, newdn );
 
         assertTrue( "attributeType OID should be present when moved to enabled schema",
-            service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+            getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         assertEquals( "attributeType should be in apachemeta schema after move",
-            service.getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
+            getService().getSchemaManager().getAttributeTypeRegistry().getSchemaName( OID ), "apachemeta" );
     }
     */
 }

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaComparatorHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -88,7 +88,7 @@ public class MetaComparatorHandlerIT ext
     @Before
     public void setup()
     {
-        schemaManager = service.getSchemaManager();
+        schemaManager = getService().getSchemaManager();
     }
 
 
@@ -109,10 +109,10 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
         assertTrue( schemaManager.getComparatorRegistry().contains( OID ) );
@@ -136,10 +136,10 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
         assertFalse( "adding new comparator to disabled schema should not register it into the registries",
@@ -161,12 +161,12 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Addition
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch ( NameNotFoundException nnfe )
@@ -202,10 +202,10 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
         assertTrue( schemaManager.getComparatorRegistry().contains( OID ) );
@@ -238,10 +238,10 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
         assertFalse( "adding new comparator to disabled schema should not register it into the registries",
@@ -267,7 +267,7 @@ public class MetaComparatorHandlerIT ext
         assertTrue( isOnDisk( dn ) );
 
         // Deletion
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         // Post-checks
         assertFalse( "comparator should be removed from the registry after being deleted", schemaManager
@@ -299,7 +299,7 @@ public class MetaComparatorHandlerIT ext
         assertTrue( isOnDisk( dn ) );
 
         // Deletion
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         // Post-checks
         assertFalse( "comparator should be removed from the registry after being deleted", schemaManager
@@ -327,7 +327,7 @@ public class MetaComparatorHandlerIT ext
         // Create a new Comparator
         testAddComparatorToEnabledSchema();
         assertTrue( isOnDisk( cDn ) );
-        assertTrue( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
 
         // Create a MR using this comparator
         Attributes attrs = LdifUtils.createAttributes(
@@ -343,18 +343,18 @@ public class MetaComparatorHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( mrDn ) );
-        assertFalse( service.getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
 
         // MatchingRule Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( mrDn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( mrDn ), attrs );
 
         // Post-checks
         assertTrue( isOnDisk( mrDn ) );
-        assertTrue( service.getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( cDn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( cDn ) );
             fail( "should not be able to delete a comparator in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -381,7 +381,7 @@ public class MetaComparatorHandlerIT ext
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-fqcn", BooleanComparator.class.getName() );
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "comparator OID should still be present", schemaManager.getComparatorRegistry().contains( OID ) );
 
@@ -404,7 +404,7 @@ public class MetaComparatorHandlerIT ext
 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-fqcn", BooleanComparator.class.getName() );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName(dn), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName(dn), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "comparator OID should still be present", schemaManager.getComparatorRegistry().contains( OID ) );
 
@@ -429,7 +429,7 @@ public class MetaComparatorHandlerIT ext
 
         Dn newdn = getComparatorContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old comparator OID should be removed from the registry after being renamed", schemaManager
             .getComparatorRegistry().contains( OID ) );
@@ -463,7 +463,7 @@ public class MetaComparatorHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename a comparator in use" );
         }
         catch ( LdapUnwillingToPerformException e )
@@ -474,7 +474,7 @@ public class MetaComparatorHandlerIT ext
         assertTrue( "comparator should still be in the registry after rename failure", schemaManager
             .getComparatorRegistry().contains( OID ) );
         schemaManager.getMatchingRuleRegistry().unregister( OID );
-        service.getSchemaManager().getGlobalOidRegistry().unregister( OID );
+        getService().getSchemaManager().getGlobalOidRegistry().unregister( OID );
     }
 
 
@@ -493,7 +493,7 @@ public class MetaComparatorHandlerIT ext
         Dn newdn = getComparatorContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "comparator OID should still be present", schemaManager.getComparatorRegistry().contains( OID ) );
 
@@ -517,7 +517,7 @@ public class MetaComparatorHandlerIT ext
         Dn newdn = getComparatorContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old comparator OID should NOT be present", schemaManager.getComparatorRegistry().contains( OID ) );
 
@@ -549,7 +549,7 @@ public class MetaComparatorHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a comparator in use" );
         }
         catch ( LdapUnwillingToPerformException e )
@@ -560,7 +560,7 @@ public class MetaComparatorHandlerIT ext
         assertTrue( "comparator should still be in the registry after move failure", schemaManager
             .getComparatorRegistry().contains( OID ) );
         schemaManager.getMatchingRuleRegistry().unregister( OID );
-        service.getSchemaManager().getGlobalOidRegistry().unregister( OID );
+        getService().getSchemaManager().getGlobalOidRegistry().unregister( OID );
     }
 
 
@@ -579,7 +579,7 @@ public class MetaComparatorHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a comparator in use" );
         }
         catch ( LdapUnwillingToPerformException e )
@@ -590,7 +590,7 @@ public class MetaComparatorHandlerIT ext
         assertTrue( "comparator should still be in the registry after move failure", schemaManager
             .getComparatorRegistry().contains( OID ) );
         schemaManager.getMatchingRuleRegistry().unregister( OID );
-        service.getSchemaManager().getGlobalOidRegistry().unregister( OID );
+        getService().getSchemaManager().getGlobalOidRegistry().unregister( OID );
     }
 
 
@@ -612,7 +612,7 @@ public class MetaComparatorHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a comparator up to ou=schema" );
         }
         catch ( LdapInvalidDnException e )
@@ -639,7 +639,7 @@ public class MetaComparatorHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a comparator up to normalizers container" );
         }
         catch ( LdapInvalidDnException e )
@@ -665,7 +665,7 @@ public class MetaComparatorHandlerIT ext
         Dn newdn = getComparatorContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "comparator OID should no longer be present", schemaManager.getComparatorRegistry().contains( OID ) );
     }
@@ -687,7 +687,7 @@ public class MetaComparatorHandlerIT ext
         Dn newdn = getComparatorContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "comparator OID should be present when moved to enabled schema", schemaManager
             .getComparatorRegistry().contains( OID ) );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -75,7 +75,7 @@ public class MetaMatchingRuleHandlerIT e
     @Before
     public void setup()
     {
-        schemaManager = service.getSchemaManager();
+        schemaManager = getService().getSchemaManager();
     }
 
 
@@ -93,10 +93,10 @@ public class MetaMatchingRuleHandlerIT e
         dn = dn.add( "m-oid" + "=" + OID );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( isOnDisk( dn ) );
-        assertTrue( service.getSchemaManager().getComparatorRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getComparatorRegistry().contains( OID ) );
     }
 
 
@@ -123,14 +123,14 @@ public class MetaMatchingRuleHandlerIT e
 
         // Pre-checks
         assertFalse( isOnDisk( dn ) );
-        assertFalse( service.getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getAttributeTypeRegistry().contains( OID ) );
 
         // Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         // Post-checks
-        assertTrue( service.getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
-        assertEquals( service.getSchemaManager().getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
+        assertTrue( getService().getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
+        assertEquals( getService().getSchemaManager().getMatchingRuleRegistry().getSchemaName( OID ), "apachemeta" );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -150,7 +150,7 @@ public class MetaMatchingRuleHandlerIT e
 
         Dn dn = getMatchingRuleContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( "adding new matchingRule to disabled schema should not register it into the registries",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -176,7 +176,7 @@ public class MetaMatchingRuleHandlerIT e
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch( NameNotFoundException nnfe )
@@ -204,7 +204,7 @@ public class MetaMatchingRuleHandlerIT e
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "matchingRule should be removed from the registry after being deleted",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -233,7 +233,7 @@ public class MetaMatchingRuleHandlerIT e
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "matchingRule should be removed from the registry after being deleted",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -262,7 +262,7 @@ public class MetaMatchingRuleHandlerIT e
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         attr = new BasicAttribute( "m-syntax", SchemaConstants.DIRECTORY_STRING_SYNTAX );
         mods[1] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "matchingRule OID should still be present",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -292,7 +292,7 @@ public class MetaMatchingRuleHandlerIT e
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
         mods.put( "m-syntax", SchemaConstants.DIRECTORY_STRING_SYNTAX );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "matchingRule OID should still be present",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -319,7 +319,7 @@ public class MetaMatchingRuleHandlerIT e
 
         Dn newdn = getMatchingRuleContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old matchingRule OID should be removed from the registry after being renamed",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -352,7 +352,7 @@ public class MetaMatchingRuleHandlerIT e
         Dn newdn = getMatchingRuleContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "matchingRule OID should still be present",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -374,7 +374,7 @@ public class MetaMatchingRuleHandlerIT e
         Dn newdn = getMatchingRuleContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old matchingRule OID should NOT be present",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -519,7 +519,7 @@ public class MetaMatchingRuleHandlerIT e
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a matchingRule up to ou=schema" );
         }
         catch( LdapInvalidDnException e )
@@ -546,7 +546,7 @@ public class MetaMatchingRuleHandlerIT e
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a matchingRule into comparators container" );
         }
         catch( LdapInvalidDnException e )
@@ -572,7 +572,7 @@ public class MetaMatchingRuleHandlerIT e
         Dn newdn = getMatchingRuleContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "matchingRule OID should no longer be present",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );
@@ -595,7 +595,7 @@ public class MetaMatchingRuleHandlerIT e
         Dn newdn = getMatchingRuleContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
 
         assertTrue( "matchingRule OID should be present when moved to enabled schema",
             schemaManager.getMatchingRuleRegistry().contains( OID ) );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -48,8 +48,8 @@ import org.apache.directory.shared.ldap.
 import org.apache.directory.shared.ldap.model.name.Dn;
 import org.apache.directory.shared.ldap.model.schema.MatchingRule;
 import org.apache.directory.shared.ldap.model.schema.SchemaManager;
-import org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer;
 import org.apache.directory.shared.ldap.model.schema.normalizers.DeepTrimNormalizer;
+import org.apache.directory.shared.ldap.model.schema.normalizers.NoOpNormalizer;
 import org.apache.directory.shared.ldap.util.JndiUtils;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -76,7 +76,7 @@ public class MetaNormalizerHandlerIT ext
     @Before
     public void setup()
     {
-        schemaManager = service.getSchemaManager();
+        schemaManager = getService().getSchemaManager();
     }
 
 
@@ -96,7 +96,7 @@ public class MetaNormalizerHandlerIT ext
 
         Dn dn = getNormalizerContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getNormalizerRegistry().contains( OID ) );
         assertEquals( schemaManager.getNormalizerRegistry().getSchemaName( OID ), "apachemeta" );
@@ -120,7 +120,7 @@ public class MetaNormalizerHandlerIT ext
         // nis is by default inactive
         Dn dn = getNormalizerContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( "adding new normalizer to disabled schema should not register it into the registries",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -145,7 +145,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch( NameNotFoundException nnfe )
@@ -181,7 +181,7 @@ public class MetaNormalizerHandlerIT ext
 
         Dn dn = getNormalizerContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( schemaManager.getNormalizerRegistry().contains( OID ) );
         assertEquals( schemaManager.getNormalizerRegistry().getSchemaName( OID ), "apachemeta" );
@@ -213,7 +213,7 @@ public class MetaNormalizerHandlerIT ext
 
         Dn dn = getNormalizerContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertFalse( schemaManager.getNormalizerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
@@ -231,7 +231,7 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "normalizer should be removed from the registry after being deleted",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -260,7 +260,7 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "normalizer should be removed from the registry after being deleted",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -288,7 +288,7 @@ public class MetaNormalizerHandlerIT ext
 
         Dn newdn = getNormalizerContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName(newdn) );
 
         assertFalse( "old normalizer OID should be removed from the registry after being renamed",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -321,7 +321,7 @@ public class MetaNormalizerHandlerIT ext
         Dn newdn = getNormalizerContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "normalizer OID should still be present",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -346,7 +346,7 @@ public class MetaNormalizerHandlerIT ext
         Dn newdn = getNormalizerContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old normalizer OID should NOT be present",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -374,7 +374,7 @@ public class MetaNormalizerHandlerIT ext
         ModificationItem[] mods = new ModificationItem[1];
         Attribute attr = new BasicAttribute( "m-fqcn", DeepTrimNormalizer.class.getName() );
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "normalizer OID should still be present",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -398,7 +398,7 @@ public class MetaNormalizerHandlerIT ext
 
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-fqcn", DeepTrimNormalizer.class.getName() );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "normalizer OID should still be present",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -423,7 +423,7 @@ public class MetaNormalizerHandlerIT ext
         // Create a new Normalizer
         testAddNormalizerToEnabledSchema();
         assertTrue( isOnDisk( nDn ) );
-        assertTrue( service.getSchemaManager().getNormalizerRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getNormalizerRegistry().contains( OID ) );
 
         // Create a MR using this Normalizer
         Attributes attrs = LdifUtils.createAttributes(
@@ -439,18 +439,18 @@ public class MetaNormalizerHandlerIT ext
 
         // Pre-checks
         assertFalse( isOnDisk( mrDn ) );
-        assertFalse( service.getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
+        assertFalse( getService().getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
 
         // MatchingRule Addition
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( mrDn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( mrDn ), attrs );
 
         // Post-checks
         assertTrue( isOnDisk( mrDn ) );
-        assertTrue( service.getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
+        assertTrue( getService().getSchemaManager().getMatchingRuleRegistry().contains( OID ) );
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( nDn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( nDn ) );
             fail( "should not be able to delete a Normalizer in use" );
         }
         catch ( OperationNotSupportedException e )
@@ -477,7 +477,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a normalizer in use" );
         }
         catch( OperationNotSupportedException e )
@@ -506,7 +506,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a normalizer in use" );
         }
         catch( OperationNotSupportedException e )
@@ -534,7 +534,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename a normalizer in use" );
         }
         catch( OperationNotSupportedException e )
@@ -567,7 +567,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a normalizer up to ou=schema" );
         }
         catch( LdapInvalidDnException e )
@@ -594,7 +594,7 @@ public class MetaNormalizerHandlerIT ext
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a normalizer into comparators container" );
         }
         catch( LdapInvalidDnException e )
@@ -620,7 +620,7 @@ public class MetaNormalizerHandlerIT ext
         Dn newdn = getNormalizerContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "normalizer OID should no longer be present",
             schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -643,7 +643,7 @@ public class MetaNormalizerHandlerIT ext
         Dn newdn = getNormalizerContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "normalizer OID should be present when moved to enabled schema",
             schemaManager.getNormalizerRegistry().contains( OID ) );

Modified: directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=1071728&r1=1071727&r2=1071728&view=diff
==============================================================================
--- directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/branches/m1/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Thu Feb 17 17:50:50 2011
@@ -74,7 +74,7 @@ public class MetaObjectClassHandlerIT ex
 
     private static ObjectClassRegistry getObjectClassRegistry()
     {
-        return service.getSchemaManager().getObjectClassRegistry();
+        return getService().getSchemaManager().getObjectClassRegistry();
     }
 
 
@@ -93,7 +93,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         return dn;
     }
@@ -143,7 +143,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail( "Should not be there" );
         }
         catch( NameNotFoundException nnfe )
@@ -168,7 +168,7 @@ public class MetaObjectClassHandlerIT ex
             getObjectClassRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "objectClass should be removed from the registry after being deleted",
             getObjectClassRegistry().contains( OID ) );
@@ -197,7 +197,7 @@ public class MetaObjectClassHandlerIT ex
             getObjectClassRegistry().contains( OID ) );
         assertTrue( isOnDisk( dn ) );
 
-        getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+        getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
 
         assertFalse( "objectClass should be removed from the registry after being deleted",
             getObjectClassRegistry().contains( OID ) );
@@ -225,7 +225,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn newdn = getObjectClassContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old objectClass OID should be removed from the registry after being renamed",
             getObjectClassRegistry().contains( OID ) );
@@ -256,7 +256,7 @@ public class MetaObjectClassHandlerIT ex
         Dn newdn = getObjectClassContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "objectClass OID should still be present",
             getObjectClassRegistry().contains( OID ) );
@@ -278,7 +278,7 @@ public class MetaObjectClassHandlerIT ex
         Dn newdn = getObjectClassContainer( "apache" );
         newdn = newdn.add( "m-oid" + "=" + NEW_OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "old objectClass OID should NOT be present",
             getObjectClassRegistry().contains( OID ) );
@@ -309,7 +309,7 @@ public class MetaObjectClassHandlerIT ex
         mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
         attr = new BasicAttribute( "m-name", NEW_NAME );
         mods[1] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), mods );
 
         assertTrue( "objectClass OID should still be present",
             getObjectClassRegistry().contains( OID ) );
@@ -339,7 +339,7 @@ public class MetaObjectClassHandlerIT ex
         Attributes mods = new BasicAttributes( true );
         mods.put( "m-description", DESCRIPTION1 );
         mods.put( "m-name", NEW_NAME );
-        getSchemaContext( service ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
+        getSchemaContext( getService() ).modifyAttributes( JndiUtils.toName( dn ), DirContext.REPLACE_ATTRIBUTE, mods );
 
         assertTrue( "objectClass OID should still be present",
             getObjectClassRegistry().contains( OID ) );
@@ -373,7 +373,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + DEPENDEE_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( DEPENDEE_OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( DEPENDEE_OID ), "apachemeta" );
@@ -390,7 +390,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).destroySubcontext( JndiUtils.toName( dn ) );
+            getSchemaContext( getService() ).destroySubcontext( JndiUtils.toName( dn ) );
             fail( "should not be able to delete a objectClass in use" );
         }
         catch( OperationNotSupportedException e )
@@ -417,7 +417,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName(dn), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName(dn), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a objectClass in use" );
         }
         catch( OperationNotSupportedException e )
@@ -444,7 +444,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move an objectClass in use" );
         }
         catch( OperationNotSupportedException e )
@@ -470,7 +470,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to rename an objectClass in use" );
         }
         catch( OperationNotSupportedException e )
@@ -499,7 +499,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( top ) );
             fail( "should not be able to move a objectClass up to ou=schema" );
         }
         catch( InvalidNameException e )
@@ -525,7 +525,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+            getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
             fail( "should not be able to move a objectClass into comparators container" );
         }
         catch( InvalidNameException e )
@@ -552,7 +552,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "nis" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         return dn;
     }
@@ -571,7 +571,7 @@ public class MetaObjectClassHandlerIT ex
         Dn newdn = getObjectClassContainer( "nis" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertFalse( "objectClass OID should no longer be present",
             getObjectClassRegistry().contains( OID ) );
@@ -594,7 +594,7 @@ public class MetaObjectClassHandlerIT ex
         Dn newdn = getObjectClassContainer( "apachemeta" );
         newdn = newdn.add( "m-oid" + "=" + OID );
 
-        getSchemaContext( service ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
+        getSchemaContext( getService() ).rename( JndiUtils.toName( dn ), JndiUtils.toName( newdn ) );
 
         assertTrue( "objectClass OID should be present when moved to enabled schema",
             getObjectClassRegistry().contains( OID ) );
@@ -628,7 +628,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
@@ -664,7 +664,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail();
         }
         catch ( NamingException ne )
@@ -703,7 +703,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail();
         }
         catch ( NamingException ne )
@@ -735,7 +735,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
@@ -768,7 +768,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
@@ -804,7 +804,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail();
         }
         catch ( NamingException ne )
@@ -836,7 +836,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );
@@ -872,7 +872,7 @@ public class MetaObjectClassHandlerIT ex
 
         try
         {
-            getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+            getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
             fail();
         }
         catch ( NamingException ne )
@@ -908,7 +908,7 @@ public class MetaObjectClassHandlerIT ex
 
         Dn dn = getObjectClassContainer( "apachemeta" );
         dn = dn.add( "m-oid" + "=" + NEW_OID );
-        getSchemaContext( service ).createSubcontext( JndiUtils.toName( dn ), attrs );
+        getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attrs );
 
         assertTrue( getObjectClassRegistry().contains( NEW_OID ) );
         assertEquals( getObjectClassRegistry().getSchemaName( NEW_OID ), "apachemeta" );



Mime
View raw message