directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1235347 [4/5] - in /directory/apacheds/trunk/core-integ/src: main/java/org/apache/directory/server/core/integ/ test/java/org/apache/directory/server/core/admin/ test/java/org/apache/directory/server/core/authn/ test/java/org/apache/directo...
Date Tue, 24 Jan 2012 16:42:46 GMT
Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaMatchingRuleHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -164,19 +164,19 @@ public class MetaMatchingRuleHandlerIT e
         Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=notloaded,ou=schema" );
         Entry entry = new DefaultEntry(
             dn,
-                "objectClass: top",
-                "objectClass: metaTop",
-                "objectClass: metaMatchingRule",
-                "m-oid", OID,
-                "m-syntax", SchemaConstants.INTEGER_SYNTAX,
-                "m-description", DESCRIPTION0);
+            "objectClass: top",
+            "objectClass: metaTop",
+            "objectClass: metaMatchingRule",
+            "m-oid", OID,
+            "m-syntax", SchemaConstants.INTEGER_SYNTAX,
+            "m-description", DESCRIPTION0 );
 
         try
         {
             connection.add( entry );
             fail( "Should not be there" );
         }
-        catch( LdapException le )
+        catch ( LdapException le )
         {
             // Expected result
         }
@@ -194,7 +194,7 @@ public class MetaMatchingRuleHandlerIT e
     public void testDeleteMatchingRuleFromEnabledSchema() throws Exception
     {
         Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-        
+
         testAddMatchingRuleToEnabledSchema();
 
         assertTrue( "matchingRule should be removed from the registry after being deleted",
@@ -211,7 +211,7 @@ public class MetaMatchingRuleHandlerIT e
             schemaManager.getMatchingRuleRegistry().lookup( OID );
             fail( "matchingRule lookup should fail after deleting it" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -314,7 +314,7 @@ public class MetaMatchingRuleHandlerIT e
 
         testAddMatchingRuleToEnabledSchema();
 
-        Rdn rdn  = new Rdn( "m-oid=" + NEW_OID );
+        Rdn rdn = new Rdn( "m-oid=" + NEW_OID );
         connection.rename( dn, rdn );
 
         assertFalse( "old matchingRule OID should be removed from the registry after being renamed",
@@ -325,7 +325,7 @@ public class MetaMatchingRuleHandlerIT e
             schemaManager.getMatchingRuleRegistry().lookup( OID );
             fail( "matchingRule lookup should fail after renaming the matchingRule" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -382,114 +382,111 @@ public class MetaMatchingRuleHandlerIT e
     // ----------------------------------------------------------------------
     // Test move, rename, and delete when a MR exists and uses the Normalizer
     // ----------------------------------------------------------------------
-//    @Test
-//    public void testDeleteSyntaxWhenInUse() throws Exception
-//    {
-//        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-//
-//        testAddSyntax();
-//        addDependeeMatchingRule();
-//
-//        try
-//        {
-//            connection.delete( dn );
-//            fail( "should not be able to delete a syntax in use" );
-//        }
-//        catch( LdapException e )
-//        {
-//            //assertEquals( e.@getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
-//        }
-//
-//        assertTrue( "syntax should still be in the registry after delete failure",
-//            getLdapSyntaxRegistry().hasSyntax( OID ) );
-//    }
-
-
-//    public void testMoveSyntaxWhenInUse() throws NamingException
-//    {
-//        testAddSyntax();
-//        addDependeeMatchingRule();
-//
-//        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-//        Dn newDn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apache,ou=schema" );
-//
-//        try
-//        {
-//            super.schemaRoot.rename( dn, newDn );
-//            fail( "should not be able to move a syntax in use" );
-//        }
-//        catch( LdapUnwillingToPerformException e )
-//        {
-//            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
-//        }
-//
-//        assertTrue( "syntax should still be in the registry after move failure",
-//            registries.getLdapSyntaxRegistry().hasSyntax( OID ) );
-//    }
-//
-//
-//    public void testMoveSyntaxAndChangeRdnWhenInUse() throws NamingException
-//    {
-//        testAddSyntax();
-//        addDependeeMatchingRule()
-//
-//        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-//
-//        Dn newDn = new Dn( "m-oid=" + NEW_OID + ",ou=matchingRules,cn=apache,ou=schema" );
-
-//        try
-//        {
-//            super.schemaRoot.moveAndRename( dn, JndiUtils.toName( newdn ) );
-//            fail( "should not be able to move a syntax in use" );
-//        }
-//        catch( LdapUnwillingToPerformException e )
-//        {
-//            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
-//        }
-//
-//        assertTrue( "syntax should still be in the registry after move failure",
-//            registries.getSyntaxRegistry().hasSyntax( OID ) );
-//    }
-//
-//
+    //    @Test
+    //    public void testDeleteSyntaxWhenInUse() throws Exception
+    //    {
+    //        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
+    //
+    //        testAddSyntax();
+    //        addDependeeMatchingRule();
+    //
+    //        try
+    //        {
+    //            connection.delete( dn );
+    //            fail( "should not be able to delete a syntax in use" );
+    //        }
+    //        catch( LdapException e )
+    //        {
+    //            //assertEquals( e.@getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
+    //        }
+    //
+    //        assertTrue( "syntax should still be in the registry after delete failure",
+    //            getLdapSyntaxRegistry().hasSyntax( OID ) );
+    //    }
+
+    //    public void testMoveSyntaxWhenInUse() throws NamingException
+    //    {
+    //        testAddSyntax();
+    //        addDependeeMatchingRule();
+    //
+    //        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
+    //        Dn newDn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apache,ou=schema" );
+    //
+    //        try
+    //        {
+    //            super.schemaRoot.rename( dn, newDn );
+    //            fail( "should not be able to move a syntax in use" );
+    //        }
+    //        catch( LdapUnwillingToPerformException e )
+    //        {
+    //            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
+    //        }
+    //
+    //        assertTrue( "syntax should still be in the registry after move failure",
+    //            registries.getLdapSyntaxRegistry().hasSyntax( OID ) );
+    //    }
+    //
+    //
+    //    public void testMoveSyntaxAndChangeRdnWhenInUse() throws NamingException
+    //    {
+    //        testAddSyntax();
+    //        addDependeeMatchingRule()
+    //
+    //        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
+    //
+    //        Dn newDn = new Dn( "m-oid=" + NEW_OID + ",ou=matchingRules,cn=apache,ou=schema" );
+
+    //        try
+    //        {
+    //            super.schemaRoot.moveAndRename( dn, JndiUtils.toName( newdn ) );
+    //            fail( "should not be able to move a syntax in use" );
+    //        }
+    //        catch( LdapUnwillingToPerformException e )
+    //        {
+    //            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
+    //        }
+    //
+    //        assertTrue( "syntax should still be in the registry after move failure",
+    //            registries.getSyntaxRegistry().hasSyntax( OID ) );
+    //    }
+    //
+    //
 
     // Need to add body to this method which creates a new matchingRule after
     // the matchingRule addition code has been added.
 
-//    private void addDependeeMatchingRule()
-//    {
-//        throw new NotImplementedException();
-//    }
-//
-//    public void testRenameNormalizerWhenInUse() throws NamingException
-//    {
-//        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-//
-//        testAddSyntax();
-//        addDependeeMatchingRule();
-//
-//        Rdn rdn = new Rdn( "m-oid=" + NEW_OID );
-//
-//        try
-//        {
-//            super.schemaRoot.rename( dn, rdn );
-//            fail( "should not be able to rename a syntax in use" );
-//        }
-//        catch( LdapUnwillingToPerformException e )
-//        {
-//            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
-//        }
-//
-//        assertTrue( "syntax should still be in the registry after rename failure",
-//            registries.getSyntaxRegistry().hasSyntax( OID ) );
-//    }
-
+    //    private void addDependeeMatchingRule()
+    //    {
+    //        throw new NotImplementedException();
+    //    }
+    //
+    //    public void testRenameNormalizerWhenInUse() throws NamingException
+    //    {
+    //        Dn dn = new Dn( "m-oid=" + OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
+    //
+    //        testAddSyntax();
+    //        addDependeeMatchingRule();
+    //
+    //        Rdn rdn = new Rdn( "m-oid=" + NEW_OID );
+    //
+    //        try
+    //        {
+    //            super.schemaRoot.rename( dn, rdn );
+    //            fail( "should not be able to rename a syntax in use" );
+    //        }
+    //        catch( LdapUnwillingToPerformException e )
+    //        {
+    //            assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
+    //        }
+    //
+    //        assertTrue( "syntax should still be in the registry after rename failure",
+    //            registries.getSyntaxRegistry().hasSyntax( OID ) );
+    //    }
 
     // ----------------------------------------------------------------------
     // Let's try some freaky stuff
     // ----------------------------------------------------------------------
 
-
     @Test
     @Ignore
     public void testMoveMatchingRuleToTop() throws Exception
@@ -505,7 +502,7 @@ public class MetaMatchingRuleHandlerIT e
             connection.move( dn, top );
             fail( "should not be able to move a matchingRule up to ou=schema" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }
@@ -530,7 +527,7 @@ public class MetaMatchingRuleHandlerIT e
             connection.move( dn, newDn );
             fail( "should not be able to move a matchingRule into comparators container" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaNormalizerHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -121,7 +121,6 @@ public class MetaNormalizerHandlerIT ext
             "m-oid", OID,
             "m-description: A test normalizer" );
 
-
         connection.add( entry );
 
         assertFalse( "adding new normalizer to disabled schema should not register it into the registries",
@@ -150,7 +149,7 @@ public class MetaNormalizerHandlerIT ext
             connection.add( entry );
             fail( "Should not be there" );
         }
-        catch( LdapException nnfe )
+        catch ( LdapException nnfe )
         {
             // Expected result.
         }
@@ -216,7 +215,7 @@ public class MetaNormalizerHandlerIT ext
             "m-bytecode", out.toByteArray(),
             "m-oid", OID,
             "m-description: A test normalizer" );
-        
+
         connection.add( entry );
 
         assertFalse( schemaManager.getNormalizerRegistry().contains( OID ) );
@@ -245,7 +244,7 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().lookup( OID );
             fail( "normalizer lookup should fail after deleting the normalizer" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -274,7 +273,7 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().lookup( OID );
             fail( "normalizer lookup should fail after deleting the normalizer" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -290,7 +289,7 @@ public class MetaNormalizerHandlerIT ext
         testAddNormalizerToEnabledSchema();
 
         Rdn rdn = new Rdn( "m-oid" + "=" + NEW_OID );
-        
+
         connection.rename( dn, rdn );
 
         assertFalse( "old normalizer OID should be removed from the registry after being renamed",
@@ -302,7 +301,7 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().lookup( OID );
             fail( "normalizer lookup should fail after deleting the normalizer" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -370,7 +369,7 @@ public class MetaNormalizerHandlerIT ext
 
         Modification mod = new DefaultModification(
             ModificationOperation.REPLACE_ATTRIBUTE, "m-fqcn", DeepTrimNormalizer.class.getName() );
-        
+
         connection.modify( dn, mod );
 
         assertTrue( "normalizer OID should still be present",
@@ -424,13 +423,13 @@ public class MetaNormalizerHandlerIT ext
         Dn mrDn = new Dn( "m-oid=" + OID + ",ou=matchingrules,cn=apachemeta,ou=schema" );
 
         Entry entry = new DefaultEntry(
-                mrDn,
-                "objectClass: top",
-                "objectClass: metaTop",
-                "objectClass: metaMatchingRule",
-                "m-oid", OID,
-                "m-syntax", SchemaConstants.INTEGER_SYNTAX,
-                "m-description: test");
+            mrDn,
+            "objectClass: top",
+            "objectClass: metaTop",
+            "objectClass: metaMatchingRule",
+            "m-oid", OID,
+            "m-syntax", SchemaConstants.INTEGER_SYNTAX,
+            "m-description: test" );
 
         // Pre-checks
         assertFalse( isOnDisk( mrDn ) );
@@ -472,7 +471,7 @@ public class MetaNormalizerHandlerIT ext
             connection.move( dn, newDn );
             fail( "should not be able to move a normalizer in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -498,7 +497,7 @@ public class MetaNormalizerHandlerIT ext
             connection.moveAndRename( dn, newDn );
             fail( "should not be able to move a normalizer in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -525,7 +524,7 @@ public class MetaNormalizerHandlerIT ext
             connection.rename( dn, rdn );
             fail( "should not be able to rename a normalizer in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -540,7 +539,6 @@ public class MetaNormalizerHandlerIT ext
     // Let's try some freaky stuff
     // ----------------------------------------------------------------------
 
-
     @Test
     @Ignore
     public void testMoveNormalizerToTop() throws Exception
@@ -556,7 +554,7 @@ public class MetaNormalizerHandlerIT ext
             connection.move( dn, top );
             fail( "should not be able to move a normalizer up to ou=schema" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }
@@ -581,7 +579,7 @@ public class MetaNormalizerHandlerIT ext
             connection.move( dn, newDn );
             fail( "should not be able to move a normalizer into comparators container" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }
@@ -632,7 +630,6 @@ public class MetaNormalizerHandlerIT ext
             schemaManager.getNormalizerRegistry().getSchemaName( OID ), "apachemeta" );
     }
 
-
     class DummyMR extends MatchingRule
     {
         public DummyMR()

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaObjectClassHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -67,8 +67,6 @@ public class MetaObjectClassHandlerIT ex
     private static final String NEW_OID = "1.3.6.1.4.1.18060.0.4.0.3.100001";
     private static final String DEPENDEE_OID = "1.3.6.1.4.1.18060.0.4.0.3.100002";
 
-
-
     public static SchemaManager schemaManager;
     private static LdapConnection connection;
 
@@ -81,6 +79,7 @@ public class MetaObjectClassHandlerIT ex
         schemaManager = getService().getSchemaManager();
     }
 
+
     private static ObjectClassRegistry getObjectClassRegistry()
     {
         return schemaManager.getObjectClassRegistry();
@@ -156,7 +155,7 @@ public class MetaObjectClassHandlerIT ex
             connection.add( entry );
             fail( "Should not be there" );
         }
-        catch( LdapException le )
+        catch ( LdapException le )
         {
             // Excpected result
         }
@@ -188,7 +187,7 @@ public class MetaObjectClassHandlerIT ex
             getObjectClassRegistry().lookup( OID );
             fail( "objectClass lookup should fail after deleting it" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -217,7 +216,7 @@ public class MetaObjectClassHandlerIT ex
             getObjectClassRegistry().lookup( OID );
             fail( "objectClass lookup should fail after deleting it" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -246,7 +245,7 @@ public class MetaObjectClassHandlerIT ex
             getObjectClassRegistry().lookup( OID );
             fail( "objectClass lookup should fail after renaming the objectClass" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -313,7 +312,7 @@ public class MetaObjectClassHandlerIT ex
             ModificationOperation.REPLACE_ATTRIBUTE, "m-description", DESCRIPTION1 );
         Modification mod2 = new DefaultModification(
             ModificationOperation.REPLACE_ATTRIBUTE, "m-name", NEW_NAME );
-        
+
         connection.modify( dn, mod1, mod2 );
 
         assertTrue( "objectClass OID should still be present",
@@ -365,7 +364,7 @@ public class MetaObjectClassHandlerIT ex
     private void addDependeeObjectClass() throws Exception
     {
         Dn dn = new Dn( "m-oid=" + DEPENDEE_OID + ",ou=objectClasses,cn=apacheMeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
             dn,
             "objectClass: top",
@@ -399,7 +398,7 @@ public class MetaObjectClassHandlerIT ex
             connection.delete( dn );
             fail( "should not be able to delete a objectClass in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -424,7 +423,7 @@ public class MetaObjectClassHandlerIT ex
             connection.move( dn, newDn );
             fail( "should not be able to move a objectClass in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -449,7 +448,7 @@ public class MetaObjectClassHandlerIT ex
             connection.move( dn, newDn );
             fail( "should not be able to move an objectClass in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -525,7 +524,7 @@ public class MetaObjectClassHandlerIT ex
             connection.move( dn, newDn );
             fail( "should not be able to move a objectClass into comparators container" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -596,7 +595,7 @@ public class MetaObjectClassHandlerIT ex
         assertEquals( "objectClass should be in apachemeta schema after move",
             getObjectClassRegistry().getSchemaName( OID ), "apachemeta" );
     }
-    
+
 
     // ----------------------------------------------------------------------
     // Let's test the Abstract, Auiliary and Structural inheritence enforcement
@@ -795,7 +794,7 @@ public class MetaObjectClassHandlerIT ex
     public void testAddStructuralOCinheritingFromAbstractOC() throws Exception
     {
         Dn dn = new Dn( "m-oid=" + NEW_OID + ",ou=objectClasses,cn=apacheMeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
             dn,
             "objectClass: top",
@@ -823,7 +822,7 @@ public class MetaObjectClassHandlerIT ex
     public void testAddStructuralOCinheritingFromAuxiliaryOC() throws Exception
     {
         Dn dn = new Dn( "m-oid=" + NEW_OID + ",ou=objectClasses,cn=apacheMeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
             dn,
             "objectClass: top",
@@ -857,7 +856,7 @@ public class MetaObjectClassHandlerIT ex
     public void testAddStructuralOCinheritingFromStructuralOC() throws Exception
     {
         Dn dn = new Dn( "m-oid=" + NEW_OID + ",ou=objectClasses,cn=apacheMeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
             dn,
             "objectClass: top",

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSchemaHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -96,10 +96,10 @@ public class MetaSchemaHandlerIT extends
 {
     /** a test attribute in the test schema: uidNumber in nis schema */
     private static final String UID_NUMBER_ATTR = "uidnumber";
-    
+
     /** Another test attribute : krb5principalName taken from the Krb5Kdc schema */
     private static final String KRB5_PRINCIPAL_NAME_ATTR = "krb5PrincipalName";
-    
+
     public static SchemaManager schemaManager;
     private static LdapConnection connection;
 
@@ -118,16 +118,16 @@ public class MetaSchemaHandlerIT extends
         entry = connection.lookup( "ou=attributeTypes,cn=samba,ou=schema" );
         assertNotNull( entry );
         assertTrue( entry.get( SchemaConstants.OU_AT ).contains( "attributetypes" ) );
-        
+
         // Disable the NIS schema
         IntegrationUtils.disableSchema( getService(), "nis" );
     }
 
-    
+
     private void createDisabledBrokenSchema() throws Exception
     {
         Dn dn = new Dn( "cn=broken,ou=schema" );
-    
+
         // Create the schema
         Entry dummySchema = new DefaultEntry(
             dn,
@@ -135,11 +135,11 @@ public class MetaSchemaHandlerIT extends
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn: broken",
             MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
-        
+
         connection.add( dummySchema );
     }
 
-    
+
     private void createEnabledValidSchema( String schemaName ) throws Exception
     {
         Dn dn = new Dn( "cn=" + schemaName + ",ou=schema" );
@@ -150,10 +150,11 @@ public class MetaSchemaHandlerIT extends
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn", schemaName );
-        
+
         connection.add( entry );
     }
 
+
     // -----------------------------------------------------------------------
     // Enabling Schema tests
     // -----------------------------------------------------------------------
@@ -172,17 +173,17 @@ public class MetaSchemaHandlerIT extends
 
         // check that the nis schema is not enabled
         assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // not in the AttributeTypeRegistry
         assertFalse( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
-        
+
         // now enable the test schema
         IntegrationUtils.enableSchema( getService(), "nis" );
-        
+
         // now test that the schema is loaded
         assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
-        
+
         // double check and make sure the test attribute from the
         // test schema is now loaded and present within the attr registry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
@@ -199,7 +200,7 @@ public class MetaSchemaHandlerIT extends
     {
         // check that the 'wrong' schema is not loaded
         assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
-        
+
         // now enable the 'wrong' schema
         try
         {
@@ -211,12 +212,12 @@ public class MetaSchemaHandlerIT extends
             // Expected
             assertTrue( true );
         }
-        
+
         // Test again that the schema is not loaded
         assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
     }
 
-    
+
     /**
      * Checks to make sure that if we try to enable an already enabled
      * schema, we don't do anything.
@@ -227,30 +228,30 @@ public class MetaSchemaHandlerIT extends
     public void testEnableSchemaAlreadyEnabled() throws Exception
     {
         // check that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded(  getService(), "nis" ) );
-        
+        assertTrue( IntegrationUtils.isLoaded( getService(), "nis" ) );
+
         // Ceck that it's not enabled
         assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // not in the AttributeTypeRegistry
         assertFalse( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
-        
+
         // now enable the test schema
         IntegrationUtils.enableSchema( getService(), "nis" );
-        
+
         // and enable it again (it should not do anything)
         IntegrationUtils.enableSchema( getService(), "nis" );
-        
+
         // now test that the schema is loaded
         assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
-        
+
         // double check and make sure the test attribute from the
         // test schema is now loaded and present within the attr registry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
 
-    
+
     /**
      * Checks that if we enable a schema which will break the registries, we get
      * an error.
@@ -263,7 +264,7 @@ public class MetaSchemaHandlerIT extends
         // TODO : create a special Schema colliding with an existing one
     }
 
-    
+
     // -----------------------------------------------------------------------
     // Disabling Schema tests
     // -----------------------------------------------------------------------
@@ -282,17 +283,17 @@ public class MetaSchemaHandlerIT extends
 
         // check that the krb5kdc schema is enabled
         assertTrue( IntegrationUtils.isEnabled( getService(), "krb5kdc" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // in the AttributeTypeRegistry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
-        
+
         // now disable the krb5kdc schema
         IntegrationUtils.disableSchema( getService(), "krb5kdc" );
-        
+
         // now test that the schema is not enabled
         assertTrue( IntegrationUtils.isDisabled( getService(), "krb5kdc" ) );
-        
+
         // double check and make sure the test attribute from the
         // test schema is now loaded and present within the attr registry
         assertFalse( schemaManager.getAttributeTypeRegistry().contains( KRB5_PRINCIPAL_NAME_ATTR ) );
@@ -309,7 +310,7 @@ public class MetaSchemaHandlerIT extends
     {
         // check that the 'wrong' schema is not loaded
         assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
-        
+
         // now disable the 'wrong' schema
         try
         {
@@ -321,12 +322,12 @@ public class MetaSchemaHandlerIT extends
             // Expected
             assertTrue( true );
         }
-        
+
         // Test again that the schema is not loaded
         assertFalse( IntegrationUtils.isLoaded( getService(), "wrong" ) );
     }
 
-    
+
     /**
      * Checks to make sure that if we try to disable an already disabled
      * schema, we don't do anything.
@@ -338,26 +339,26 @@ public class MetaSchemaHandlerIT extends
     {
         // check that the nis schema is loaded
         assertTrue( IntegrationUtils.isLoaded( getService(), "nis" ) );
-        
+
         // Check that it's not enabled
         assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // not in the AttributeTypeRegistry
         assertFalse( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
-        
+
         // now disable the test schema again
         IntegrationUtils.disableSchema( getService(), "nis" );
 
         // now test that the schema is not loaded
         assertTrue( IntegrationUtils.isDisabled( getService(), "nis" ) );
-        
+
         // double check and make sure the test attribute from the
         // test schema is not loaded and present within the attr registry
         assertFalse( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
 
-    
+
     /**
      * Checks that if we disable a schema which will break the registries, we get
      * an error.
@@ -368,26 +369,27 @@ public class MetaSchemaHandlerIT extends
     public void testDisableSchemaBreakingRegistries() throws Exception
     {
         // check that the nis schema is loaded
-        assertTrue( IntegrationUtils.isLoaded(  getService(), "system" ) );
-        
+        assertTrue( IntegrationUtils.isLoaded( getService(), "system" ) );
+
         // Check that it's enabled
         assertTrue( IntegrationUtils.isEnabled( getService(), "system" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // in the AttributeTypeRegistry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( "cn" ) );
-        
+
         // now disable the system schema : it should break the registries, thus being rejected
         IntegrationUtils.disableSchema( getService(), "system" );
 
         // now test that the schema is not loaded
         assertTrue( IntegrationUtils.isEnabled( getService(), "system" ) );
-        
+
         // double check and make sure the test attribute from the
         // test schema is loaded and present within the attr registry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( "cn" ) );
     }
 
+
     // -----------------------------------------------------------------------
     // Schema Add Tests
     // -----------------------------------------------------------------------
@@ -402,14 +404,14 @@ public class MetaSchemaHandlerIT extends
         assertFalse( isOnDisk( dn ) );
 
         createEnabledValidSchema( "dummy" );
-        
+
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( connection.lookup( "cn=dummy,ou=schema" ) );
-        
+
         assertTrue( isOnDisk( dn ) );
     }
-    
-    
+
+
     /**
      * Add a valid and enabled schema with existing enabled deps
      */
@@ -427,17 +429,17 @@ public class MetaSchemaHandlerIT extends
             "cn: dummy",
             "m-dependencies: core",
             "m-dependencies: system",
-            MetaSchemaConstants.M_DISABLED_AT, "FALSE");
-        
+            MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
+
         connection.add( dummySchema );
-        
+
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( connection.lookup( "cn=dummy, ou=schema" ) );
-        
+
         assertTrue( isOnDisk( dn ) );
     }
-    
-    
+
+
     /**
      * Add a valid and enabled schema with existing disabled deps. It should not be loaded.
      */
@@ -456,7 +458,7 @@ public class MetaSchemaHandlerIT extends
             "m-dependencies: core",
             "m-dependencies: nis",
             MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
-        
+
         try
         {
             connection.add( dummySchema );
@@ -466,12 +468,12 @@ public class MetaSchemaHandlerIT extends
         {
             // expected
         }
-        
+
         assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
         assertFalse( isOnDisk( dn ) );
     }
-    
-    
+
+
     /**
      * Add a valid and enabled schema with not existing deps. It should not be loaded.
      */
@@ -490,7 +492,7 @@ public class MetaSchemaHandlerIT extends
             "m-dependencies: core",
             "m-dependencies: wrong",
             MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
-        
+
         try
         {
             connection.add( dummySchema );
@@ -500,12 +502,12 @@ public class MetaSchemaHandlerIT extends
         {
             // expected
         }
-        
+
         assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
         assertFalse( isOnDisk( dn ) );
     }
 
-    
+
     // -----------------------------------------------------------------------
     // Schema Delete Tests
     // -----------------------------------------------------------------------
@@ -516,7 +518,7 @@ public class MetaSchemaHandlerIT extends
     public void testDeleteEnabledValidSchema() throws Exception
     {
         Dn dn = new Dn( "cn=dummy,ou=schema" );
-        
+
         // Create a schema we will delete
         createEnabledValidSchema( "dummy" );
         assertTrue( isOnDisk( dn ) );
@@ -528,8 +530,8 @@ public class MetaSchemaHandlerIT extends
         assertFalse( isOnDisk( dn ) );
         assertFalse( IntegrationUtils.isLoaded( getService(), "dummy" ) );
     }
-    
-    
+
+
     /**
      * Tests the addition of a new metaSchema object that is disabled
      * on addition and has no dependencies.
@@ -548,14 +550,14 @@ public class MetaSchemaHandlerIT extends
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn: dummy",
             MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
-        
+
         connection.add( dummySchema );
-        
+
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( connection.lookup( "cn=dummy,ou=schema" ) );
     }
-    
-    
+
+
     /**
      * Tests the addition of a new metaSchema object that is disabled
      * on addition and has dependencies.
@@ -576,14 +578,14 @@ public class MetaSchemaHandlerIT extends
             MetaSchemaConstants.M_DISABLED_AT, "TRUE",
             "m-dependencies: nis",
             "m-dependencies: core" );
-        
+
         connection.add( dummySchema );
-        
+
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( connection.lookup( "cn=dummy,ou=schema" ) );
     }
-    
-    
+
+
     /**
      * Tests the rejection of a new metaSchema object that is disabled
      * on addition and has missing dependencies.
@@ -604,16 +606,16 @@ public class MetaSchemaHandlerIT extends
             MetaSchemaConstants.M_DISABLED_AT, "TRUE",
             "m-dependencies: missing",
             "m-dependencies: core" );
-        
+
         try
         {
             connection.add( dummySchema );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
             // expected
         }
-        
+
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
@@ -622,12 +624,12 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=dummy,ou=schema" );
             fail( "schema should not be added to schema partition" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
-    
-    
+
+
     /**
      * Tests the addition of a new metaSchema object that is enabled
      * on addition and has no dependencies.
@@ -648,12 +650,12 @@ public class MetaSchemaHandlerIT extends
             );
 
         connection.add( dummySchema );
-        
+
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
         assertNotNull( connection.lookup( "cn=dummy,ou=schema" ) );
     }
-    
-    
+
+
     /**
      * Tests the rejection of a metaSchema object add that is enabled
      * on addition yet has disabled dependencies.
@@ -672,17 +674,17 @@ public class MetaSchemaHandlerIT extends
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn: dummy",
             "m-dependencies: nis" );
-        
+
         try
         {
             connection.add( dummySchema );
             fail( "should not be able to add enabled schema with deps on disabled schemas" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
             // expected
         }
-        
+
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
@@ -691,17 +693,16 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=dummy,ou=schema" );
             fail( "schema should not be added to schema partition" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
 
-    
+
     // -----------------------------------------------------------------------
     // Schema Delete Tests
     // -----------------------------------------------------------------------
 
-    
     /**
      * Makes sure we can delete schemas that have no dependents.
      *
@@ -716,13 +717,13 @@ public class MetaSchemaHandlerIT extends
         // add the dummy schema enabled
         testAddEnabledSchemaNoDeps();
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
-        
+
         // delete it now
         connection.delete( dn );
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
     }
-    
-    
+
+
     /**
      * Makes sure we can NOT delete schemas that have dependents.
      *
@@ -735,11 +736,11 @@ public class MetaSchemaHandlerIT extends
         // add the dummy schema enabled
         testAddEnabledSchemaNoDeps();
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
-        
+
         // make the nis schema depend on the dummy schema
         connection.modify( "cn=nis,ou=schema",
             new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, "m-dependencies", "dummy" ) );
-        
+
         // attempt to delete it now & it should fail
         try
         {
@@ -753,8 +754,8 @@ public class MetaSchemaHandlerIT extends
 
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
     }
-    
-    
+
+
     /**
      * Tests the rejection of a new metaSchema object that is enabled
      * on addition and missing dependencies.
@@ -773,17 +774,17 @@ public class MetaSchemaHandlerIT extends
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn: dummy",
             "m-dependencies: missing" );
-        
+
         try
         {
             connection.add( dummySchema );
             fail( "should not be able to add enabled schema with deps on missing schemas" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
             // expected
         }
-        
+
         assertFalse( IntegrationUtils.isEnabled( getService(), "dummy" ) );
 
         //noinspection EmptyCatchBlock
@@ -792,12 +793,12 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=dummy,ou=schema" );
             fail( "schema should not be added to schema partition" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
 
-    
+
     /**
      * Checks to make sure updates disabling a metaSchema object in
      * the schema partition triggers the unloading of that schema from
@@ -811,30 +812,30 @@ public class MetaSchemaHandlerIT extends
     {
         // let's enable the test schema and add the dummy schema
         // as enabled by default and dependends on the test schema
-        
+
         // enables the test schema and samba
         testEnableExistingSchema();
-        
+
         // adds enabled dummy schema that depends on the test schema
         Dn dn = new Dn( "cn=dummy, ou=schema" );
-        
+
         Entry dummySchema = new DefaultEntry(
             dn,
             "objectClass: top",
             "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
             "cn: dummy",
             "m-dependencies: nis" );
-        
+
         connection.add( dummySchema );
-        
+
         // check that the nis schema is loaded and the dummy schema is loaded
         assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
-        
+
         // double check and make sure an attribute from that schema is
         // in the AttributeTypeRegistry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
-        
+
         // now try to disable the test schema which should fail
         // since it's dependent, the dummy schema, is enabled
         try
@@ -847,17 +848,17 @@ public class MetaSchemaHandlerIT extends
         {
             // expected
         }
-        
+
         // now test that both schema are still loaded
         assertTrue( IntegrationUtils.isEnabled( getService(), "nis" ) );
         assertTrue( IntegrationUtils.isEnabled( getService(), "dummy" ) );
-        
+
         // double check and make sure the test attribute from the test
         // schema is still loaded and present within the attr registry
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( UID_NUMBER_ATTR ) );
     }
-    
-    
+
+
     // -----------------------------------------------------------------------
     // Schema Rename Tests
     // -----------------------------------------------------------------------
@@ -889,7 +890,7 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=samba,ou=schema" );
             fail( "the samba schema should not be present after a rename to foo" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
@@ -915,7 +916,7 @@ public class MetaSchemaHandlerIT extends
         {
             // expected
         }
-        
+
         assertNotNull( connection.lookup( "cn=nis,ou=schema" ) );
 
         //noinspection EmptyCatchBlock
@@ -924,7 +925,7 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=foo,ou=schema" );
             fail( "the foo schema should not be present after rejecting the rename" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
@@ -944,7 +945,7 @@ public class MetaSchemaHandlerIT extends
         IntegrationUtils.enableSchema( getService(), "samba" );
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
         assertEquals( "samba", schemaManager.getAttributeTypeRegistry().getSchemaName( "sambaNTPassword" ) );
-        
+
         connection.rename( "cn=samba,ou=schema", "cn=foo" );
         assertNotNull( connection.lookup( "cn=foo, ou=schema" ) );
         assertTrue( schemaManager.getAttributeTypeRegistry().contains( "sambaNTPassword" ) );
@@ -956,7 +957,7 @@ public class MetaSchemaHandlerIT extends
             connection.lookup( "cn=samba, ou=schema" );
             fail( "the samba schema should not be present after a rename to foo" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
     }
@@ -978,7 +979,7 @@ public class MetaSchemaHandlerIT extends
         try
         {
             connection.modify( "cn=nis,ou=schema",
-                new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, "m-dependencies", "bogus" ));
+                new DefaultModification( ModificationOperation.ADD_ATTRIBUTE, "m-dependencies", "bogus" ) );
             fail( "Should not be able to add bogus dependency to schema" );
         }
         catch ( LdapException onse )
@@ -1001,7 +1002,7 @@ public class MetaSchemaHandlerIT extends
     public void testRejectAddOfDisabledDependencyToEnabledSchema() throws Exception
     {
         IntegrationUtils.enableSchema( getService(), "nis" );
-        
+
         try
         {
             connection.modify( "cn=nis,ou=schema",

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxCheckerHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -66,6 +66,7 @@ public class MetaSyntaxCheckerHandlerIT 
     private static LdapConnection connection;
     private static SchemaManager schemaManager;
 
+
     @Before
     public void setup() throws Exception
     {
@@ -167,7 +168,7 @@ public class MetaSyntaxCheckerHandlerIT 
         }
 
         Dn dn = new Dn( "m-oid=" + OID + ",ou=syntaxCheckers,cn=apachemeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
             dn,
             "objectClass: top",
@@ -183,7 +184,8 @@ public class MetaSyntaxCheckerHandlerIT 
         assertTrue( schemaManager.getSyntaxCheckerRegistry().contains( OID ) );
         assertEquals( schemaManager.getSyntaxCheckerRegistry().getSchemaName( OID ), "apachemeta" );
         Class<?> clazz = schemaManager.getSyntaxCheckerRegistry().lookup( OID ).getClass();
-        assertEquals( clazz.getName(), "org.apache.directory.shared.ldap.model.schema.syntaxCheckers.DummySyntaxChecker" );
+        assertEquals( clazz.getName(),
+            "org.apache.directory.shared.ldap.model.schema.syntaxCheckers.DummySyntaxChecker" );
         assertTrue( isOnDisk( dn ) );
     }
 
@@ -209,7 +211,7 @@ public class MetaSyntaxCheckerHandlerIT 
             "m-fqcn", "org.apache.directory.shared.ldap.model.schema.syntaxCheckers.DummySyntaxChecker",
             "m-bytecode", out.toByteArray(),
             "m-oid", OID,
-            "m-description: A test syntaxChecker");
+            "m-description: A test syntaxChecker" );
 
         connection.add( entry );
 

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/MetaSyntaxHandlerIT.java Tue Jan 24 16:42:44 2012
@@ -155,7 +155,7 @@ public class MetaSyntaxHandlerIT extends
             connection.add( entry );
             fail( "Should not be there" );
         }
-        catch( LdapException le )
+        catch ( LdapException le )
         {
             // Expected result.
         }
@@ -187,7 +187,7 @@ public class MetaSyntaxHandlerIT extends
             schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting it" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -216,7 +216,7 @@ public class MetaSyntaxHandlerIT extends
             schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting it" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -245,7 +245,7 @@ public class MetaSyntaxHandlerIT extends
             schemaManager.getLdapSyntaxRegistry().lookup( OID );
             fail( "syntax lookup should fail after deleting the syntax" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -352,7 +352,6 @@ public class MetaSyntaxHandlerIT extends
     // Test move, rename, and delete when a MR exists and uses the Normalizer
     // ----------------------------------------------------------------------
 
-
     @Test
     public void testDeleteSyntaxWhenInUse() throws Exception
     {
@@ -366,7 +365,7 @@ public class MetaSyntaxHandlerIT extends
             connection.delete( dn );
             fail( "should not be able to delete a syntax in use" );
         }
-        catch( LdapException e )
+        catch ( LdapException e )
         {
         }
 
@@ -391,7 +390,7 @@ public class MetaSyntaxHandlerIT extends
             connection.move( dn, newDn );
             fail( "should not be able to move a syntax in use" );
         }
-        catch( LdapUnwillingToPerformException e )
+        catch ( LdapUnwillingToPerformException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
@@ -417,7 +416,7 @@ public class MetaSyntaxHandlerIT extends
             connection.moveAndRename( dn, newDn );
             fail( "should not be able to move a syntax in use" );
         }
-        catch( LdapUnwillingToPerformException e )
+        catch ( LdapUnwillingToPerformException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
@@ -430,15 +429,15 @@ public class MetaSyntaxHandlerIT extends
     private void addDependeeMatchingRule( String oid ) throws Exception
     {
         Dn dn = new Dn( "m-oid=" + MR_OID + ",ou=matchingRules,cn=apachemeta,ou=schema" );
-        
+
         Entry entry = new DefaultEntry(
-                dn,
-                "objectClass: top",
-                "objectClass: metaTop",
-                "objectClass: metaMatchingRule",
-                "m-oid", MR_OID,
-                "m-syntax", OID,
-                "m-description", MR_DESCRIPTION);
+            dn,
+            "objectClass: top",
+            "objectClass: metaTop",
+            "objectClass: metaMatchingRule",
+            "m-oid", MR_OID,
+            "m-syntax", OID,
+            "m-description", MR_DESCRIPTION );
 
         connection.add( entry );
 
@@ -463,7 +462,7 @@ public class MetaSyntaxHandlerIT extends
             connection.rename( dn, rdn );
             fail( "should not be able to rename a syntax in use" );
         }
-        catch( LdapUnwillingToPerformException e )
+        catch ( LdapUnwillingToPerformException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.UNWILLING_TO_PERFORM );
         }
@@ -477,7 +476,6 @@ public class MetaSyntaxHandlerIT extends
     // Let's try some freaky stuff
     // ----------------------------------------------------------------------
 
-
     @Test
     @Ignore
     public void testMoveSyntaxToTop() throws Exception
@@ -493,7 +491,7 @@ public class MetaSyntaxHandlerIT extends
             connection.move( dn, top );
             fail( "should not be able to move a syntax up to ou=schema" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }
@@ -518,7 +516,7 @@ public class MetaSyntaxHandlerIT extends
             connection.move( dn, newDn );
             fail( "should not be able to move a syntax into comparators container" );
         }
-        catch( LdapInvalidDnException e )
+        catch ( LdapInvalidDnException e )
         {
             assertEquals( e.getResultCode(), ResultCodeEnum.NAMING_VIOLATION );
         }
@@ -606,7 +604,7 @@ public class MetaSyntaxHandlerIT extends
         Entry rootDse = connection.getRootDse( SUBSCHEMA_SUBENTRY );
 
         String subschemaSubentry = rootDse.get( SUBSCHEMA_SUBENTRY ).getString();
-        
+
         return subschemaSubentry;
     }
 }

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/ObjectClassCreateIT.java Tue Jan 24 16:42:44 2012
@@ -61,7 +61,7 @@ public class ObjectClassCreateIT extends
         // The accountStatus AT
         //--------------------------------------------------------------------
         Attributes attributes = new BasicAttributes( true );
-        Attribute  objectClassAttribute = new BasicAttribute( "objectClass" );
+        Attribute objectClassAttribute = new BasicAttribute( "objectClass" );
 
         objectClassAttribute.add( "top" );
         objectClassAttribute.add( "metaTop" );
@@ -114,7 +114,7 @@ public class ObjectClassCreateIT extends
         // The extendPerson OC
         //--------------------------------------------------------------------
         attributes = new BasicAttributes( true );
-         objectClassAttribute = new BasicAttribute( "objectClass" );
+        objectClassAttribute = new BasicAttribute( "objectClass" );
 
         objectClassAttribute.add( "top" );
         objectClassAttribute.add( "metaTop" );
@@ -149,6 +149,7 @@ public class ObjectClassCreateIT extends
         getSchemaContext( getService() ).createSubcontext( JndiUtils.toName( dn ), attributes );
     }
 
+
     /**
      * Gets relative Dn to ou=schema.
      *
@@ -169,7 +170,7 @@ public class ObjectClassCreateIT extends
     public void testCannotCreateObjectClassWithInvalidNameAttribute() throws Exception
     {
         Attributes attributes = new BasicAttributes( true );
-        Attribute  objectClassAttribute = new BasicAttribute( "objectClass" );
+        Attribute objectClassAttribute = new BasicAttribute( "objectClass" );
 
         objectClassAttribute.add( "top" );
         objectClassAttribute.add( "metaTop" );
@@ -196,6 +197,7 @@ public class ObjectClassCreateIT extends
         }
     }
 
+
     /*
      * Test that I canotn create an ObjectClass entry with an invalid name
      */
@@ -203,7 +205,7 @@ public class ObjectClassCreateIT extends
     public void testCannotCreateObjectClassWithNoObjectClass() throws Exception
     {
         Attributes attributes = new BasicAttributes( true );
-        Attribute  objectClassAttribute = new BasicAttribute( "objectClass" );
+        Attribute objectClassAttribute = new BasicAttribute( "objectClass" );
 
         objectClassAttribute.add( "top" );
         objectClassAttribute.add( "metaTop" );
@@ -258,7 +260,7 @@ public class ObjectClassCreateIT extends
         entry.put( "cn", "test" );
         entry.put( "displayName", "test-test" );
         entry.put( "initials", "tt" );
-        entry.put(  "accountStatus", "test" );
+        entry.put( "accountStatus", "test" );
 
         // Create the context
         DirContext system = getSystemContext( getService() );

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/PartitionSchemaLoaderTest.java Tue Jan 24 16:42:44 2012
@@ -58,16 +58,18 @@ public class PartitionSchemaLoaderTest
     private static InstanceLayout instanceLayout;
 
 
-    @BeforeClass public static void setUp() throws Exception
+    @BeforeClass
+    public static void setUp() throws Exception
     {
         // setup working directory
         directoryService = new DefaultDirectoryService();
         String tmpDirPath = System.getProperty( "workingDirectory", System.getProperty( "java.io.tmpdir" ) );
-        File workingDirectory = new File( tmpDirPath + "/server-work-" + PartitionSchemaLoaderTest.class.getSimpleName() );
+        File workingDirectory = new File( tmpDirPath + "/server-work-"
+            + PartitionSchemaLoaderTest.class.getSimpleName() );
         instanceLayout = new InstanceLayout( workingDirectory );
         directoryService.setInstanceLayout( instanceLayout );
 
-        if ( ! workingDirectory.exists() )
+        if ( !workingDirectory.exists() )
         {
             workingDirectory.mkdirs();
         }
@@ -88,7 +90,7 @@ public class PartitionSchemaLoaderTest
 
         if ( !loaded )
         {
-            fail( "Schema load failed : " + Exceptions.printErrors(schemaManager.getErrors()) );
+            fail( "Schema load failed : " + Exceptions.printErrors( schemaManager.getErrors() ) );
         }
 
         directoryService.setSchemaManager( schemaManager );
@@ -100,8 +102,8 @@ public class PartitionSchemaLoaderTest
     {
         FileUtils.deleteDirectory( instanceLayout.getInstanceDirectory() );
     }
-    
-    
+
+
     @Test
     public void testGetSchemas() throws Exception
     {

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaPersistenceIT.java Tue Jan 24 16:42:44 2012
@@ -61,7 +61,7 @@ import org.junit.runner.RunWith;
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
 @RunWith(FrameworkRunner.class)
-@CreateDS( name="SchemaPersistenceIT-class" )
+@CreateDS(name = "SchemaPersistenceIT-class")
 public class SchemaPersistenceIT extends AbstractLdapTestUnit
 {
     private static final String SUBSCHEMA_SUBENTRY = "subschemaSubentry";
@@ -88,23 +88,23 @@ public class SchemaPersistenceIT extends
 
             descriptions.add(
                 "( 1.3.6.1.4.1.18060.0.4.1.2.10000 " +
-                "  NAME 'type0' " +
-                "  OBSOLETE SUP 2.5.4.41 " +
-                "  EQUALITY caseExactIA5Match " +
-                "  ORDERING octetStringOrderingMatch " +
-                "  SUBSTR caseExactIA5SubstringsMatch " +
-                "  COLLECTIVE " +
-                "  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 " +
-                "  USAGE userApplications " +
-                "  X-SCHEMA 'nis' )" );
+                    "  NAME 'type0' " +
+                    "  OBSOLETE SUP 2.5.4.41 " +
+                    "  EQUALITY caseExactIA5Match " +
+                    "  ORDERING octetStringOrderingMatch " +
+                    "  SUBSTR caseExactIA5SubstringsMatch " +
+                    "  COLLECTIVE " +
+                    "  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 " +
+                    "  USAGE userApplications " +
+                    "  X-SCHEMA 'nis' )" );
 
             descriptions.add(
                 "( 1.3.6.1.4.1.18060.0.4.1.2.10001 " +
-                "  NAME ( 'type1' 'altName' ) " +
-                "  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 " +
-                "  SUP 2.5.4.41 " +
-                "  USAGE userApplications " +
-                "  X-SCHEMA 'nis' )" );
+                    "  NAME ( 'type1' 'altName' ) " +
+                    "  SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 " +
+                    "  SUP 2.5.4.41 " +
+                    "  USAGE userApplications " +
+                    "  X-SCHEMA 'nis' )" );
 
             modify( DirContext.ADD_ATTRIBUTE, descriptions, "attributeTypes" );
 
@@ -175,7 +175,8 @@ public class SchemaPersistenceIT extends
         controls.setReturningAttributes( new String[]
             { SUBSCHEMA_SUBENTRY } );
 
-        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "", "(objectClass=*)",
+            controls );
         SearchResult result = results.next();
         results.close();
         Attribute subschemaSubentry = result.getAttributes().get( SUBSCHEMA_SUBENTRY );
@@ -244,7 +245,8 @@ public class SchemaPersistenceIT extends
 
         if ( isPresent )
         {
-            attrs = getSchemaContext( getService() ).getAttributes( "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
+            attrs = getSchemaContext( getService() ).getAttributes(
+                "m-oid=" + oid + ",ou=attributeTypes,cn=" + schemaName );
             assertNotNull( attrs );
         }
         else

Modified: directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java?rev=1235347&r1=1235346&r2=1235347&view=diff
==============================================================================
--- directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java (original)
+++ directory/apacheds/trunk/core-integ/src/test/java/org/apache/directory/server/core/schema/SchemaServiceIT.java Tue Jan 24 16:42:44 2012
@@ -62,25 +62,25 @@ import org.junit.runner.RunWith;
  *
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-@ApplyLdifs( {
-    // Entry # 1
-    "dn: cn=person0,ou=system",
-    "objectClass: person",
-    "cn: person0",
-    "sn: sn_person0\n",
-    // Entry # 2
-    "dn: cn=person1,ou=system",
-    "objectClass: organizationalPerson",
-    "cn: person1",
-    "sn: sn_person1",
-    "seealso: cn=Good One,ou=people,o=sevenSeas",
-    //"seealso:: Y249QmFkIEXDqWvDoCxvdT1wZW9wbGUsbz1zZXZlblNlYXM=\n",
-    // Entry # 3
-    "dn: cn=person2,ou=system",
-    "objectClass: inetOrgPerson",
-    "cn: person2",
-    "sn: sn_person2" }
-    )
+@ApplyLdifs(
+    {
+        // Entry # 1
+        "dn: cn=person0,ou=system",
+        "objectClass: person",
+        "cn: person0",
+        "sn: sn_person0\n",
+        // Entry # 2
+        "dn: cn=person1,ou=system",
+        "objectClass: organizationalPerson",
+        "cn: person1",
+        "sn: sn_person1",
+        "seealso: cn=Good One,ou=people,o=sevenSeas",
+        //"seealso:: Y249QmFkIEXDqWvDoCxvdT1wZW9wbGUsbz1zZXZlblNlYXM=\n",
+        // Entry # 3
+        "dn: cn=person2,ou=system",
+        "objectClass: inetOrgPerson",
+        "cn: person2",
+        "sn: sn_person2" })
 @RunWith(FrameworkRunner.class)
 @CreateDS(name = "SchemaServiceIT")
 public class SchemaServiceIT extends AbstractLdapTestUnit
@@ -97,7 +97,7 @@ public class SchemaServiceIT extends Abs
         Attributes attrs = new BasicAttributes( "objectClass", "top", true );
         attrs.get( "objectClass" ).add( "uidObject" );
         attrs.put( "uid", "invalid" );
-        
+
         try
         {
             getSystemContext( getService() ).createSubcontext( "uid=invalid", attrs );
@@ -106,8 +106,8 @@ public class SchemaServiceIT extends Abs
         {
         }
     }
-    
-    
+
+
     /**
      * For <a href="https://issues.apache.org/jira/browse/DIRSERVER-925">DIRSERVER-925</a>.
      *
@@ -122,7 +122,7 @@ public class SchemaServiceIT extends Abs
         attrs.put( "ou", "comedy" );
         attrs.put( "cn", "Jack Black" );
         attrs.put( "sn", "Black" );
-        
+
         try
         {
             getSystemContext( getService() ).createSubcontext( "cn=Jack Black", attrs );
@@ -131,8 +131,8 @@ public class SchemaServiceIT extends Abs
         {
         }
     }
-    
-    
+
+
     /**
      * For <a href="https://issues.apache.org/jira/browse/DIRSERVER-904">DIRSERVER-904</a>.
      *
@@ -174,26 +174,26 @@ public class SchemaServiceIT extends Abs
         LdifEntry numberOfGunsAttrEntry = ldifReader.next();
         LdifEntry shipOCEntry = ldifReader.next();
         assertFalse( ldifReader.hasNext() );
-        
+
         // should be fine with unique OID
-        getService().getAdminSession().add( 
-            new DefaultEntry( getService().getSchemaManager(), numberOfGunsAttrEntry.getEntry() ) ); 
+        getService().getAdminSession().add(
+            new DefaultEntry( getService().getSchemaManager(), numberOfGunsAttrEntry.getEntry() ) );
 
         // should blow chuncks using same OID
         try
         {
-            getService().getAdminSession().add( 
-                new DefaultEntry( getService().getSchemaManager(), shipOCEntry.getEntry() ) ); 
-            
+            getService().getAdminSession().add(
+                new DefaultEntry( getService().getSchemaManager(), shipOCEntry.getEntry() ) );
+
             fail( "Should not be possible to create two schema entities with the same OID." );
         }
-        catch( LdapOtherException e )
+        catch ( LdapOtherException e )
         {
             assertTrue( true );
         }
     }
-    
-    
+
+
     /**
      * Test that we have all the needed ObjectClasses
      * 
@@ -237,7 +237,7 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = sysRoot.search( "", "(objectClass=*person)", controls );
-        
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -281,7 +281,7 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> orgPersons = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = sysRoot.search( "", "(objectClass=organizationalPerson)", controls );
-        
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -318,7 +318,7 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> inetOrgPersons = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = sysRoot.search( "", "(objectClass=inetOrgPerson)", controls );
-        
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -344,9 +344,10 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
-        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "cn=schema", "(objectClass=*)", controls );
+        NamingEnumeration<SearchResult> results = getRootContext( getService() ).search( "cn=schema",
+            "(objectClass=*)", controls );
 
         while ( results.hasMore() )
         {
@@ -356,18 +357,18 @@ public class SchemaServiceIT extends Abs
 
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         // We should have 2 attributes in the result :
         // - attributeTypes
         // - cn
         // - objectClass
         assertEquals( 2, attrs.size() );
-        
+
         assertNotNull( attrs.get( "cn" ) );
         assertNotNull( attrs.get( "objectClass" ) );
     }
@@ -378,11 +379,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        controls.setReturningAttributes( new String[]{ "*", "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "*", "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() ).search(
-                "cn=schema", "(objectClass=*)", controls );
+            "cn=schema", "(objectClass=*)", controls );
 
         while ( results.hasMore() )
         {
@@ -392,26 +394,27 @@ public class SchemaServiceIT extends Abs
 
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         assertNotNull( attrs.get( "nameForms" ) );
     }
 
-    
+
     @Test
     public void testSearchForSubSchemaSubEntrySingleAttributeSelected() throws Exception
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        controls.setReturningAttributes( new String[]{ "nameForms" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "nameForms" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(objectClass=*)", controls );
+            .search( "cn=schema", "(objectClass=*)", controls );
 
         while ( results.hasMore() )
         {
@@ -421,16 +424,16 @@ public class SchemaServiceIT extends Abs
 
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         // We should have 1 attribute in the result :
         // - nameForms
         assertEquals( 1, attrs.size() );
-        
+
         assertNull( attrs.get( "attributeTypes" ) );
         assertNull( attrs.get( "cn" ) );
         assertNull( attrs.get( "creatorsName" ) );
@@ -447,7 +450,7 @@ public class SchemaServiceIT extends Abs
         assertNull( attrs.get( "objectClasses" ) );
     }
 
-    
+
     /**
      * Test for DIRSERVER-1055.
      * Check if modifyTimestamp and createTimestamp are present in the search result,
@@ -460,28 +463,28 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
         controls.setReturningAttributes( new String[]
             { "creatorsName", "createTimestamp", "modifiersName", "modifyTimestamp" } );
-        
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-        .search( "cn=schema", "(objectClass=subschema)", controls );
-        
+            .search( "cn=schema", "(objectClass=subschema)", controls );
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
             subSchemaEntry.put( result.getName(), result.getAttributes() );
         }
-        
+
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         // We should have 4 attribute in the result :
         assertEquals( 4, attrs.size() );
-        
+
         assertNull( attrs.get( "attributeTypes" ) );
         assertNull( attrs.get( "cn" ) );
         assertNotNull( attrs.get( "creatorsName" ) );
@@ -504,11 +507,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        controls.setReturningAttributes( new String[]{ "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(objectClass=nothing)", controls );
+            .search( "cn=schema", "(objectClass=nothing)", controls );
 
         while ( results.hasMore() )
         {
@@ -526,11 +530,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        controls.setReturningAttributes( new String[]{ "*", "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "*", "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(objectClass=top)", controls );
+            .search( "cn=schema", "(objectClass=top)", controls );
 
         while ( results.hasMore() )
         {
@@ -540,19 +545,19 @@ public class SchemaServiceIT extends Abs
 
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         // We should have 18 attribute in the result :
         // - nameForms
         // - comparators
         // - normalizers
         // - syntaxCheckers
         assertEquals( 18, attrs.size() );
-        
+
         assertNotNull( attrs.get( "attributeTypes" ) );
         assertNotNull( attrs.get( "cn" ) );
         assertNotNull( attrs.get( "comparators" ) );
@@ -579,11 +584,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.OBJECT_SCOPE );
-        controls.setReturningAttributes( new String[]{ "*", "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "*", "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(objectClass=subSchema)", controls );
+            .search( "cn=schema", "(objectClass=subSchema)", controls );
 
         while ( results.hasMore() )
         {
@@ -593,19 +599,19 @@ public class SchemaServiceIT extends Abs
 
         // We should have only one entry in the result
         assertEquals( 1, subSchemaEntry.size() );
-        
+
         // It should be the normalized form of cn=schema
         Attributes attrs = subSchemaEntry.get( "cn=schema" );
-        
+
         assertNotNull( attrs );
-        
+
         // We should have 18 attribute in the result :
         // - nameForms
         // - comparators
         // - normalizers
         // - syntaxCheckers
         assertEquals( 18, attrs.size() );
-        
+
         assertNotNull( attrs.get( "attributeTypes" ) );
         assertNotNull( attrs.get( "cn" ) );
         assertNotNull( attrs.get( "subtreeSpecification" ) );
@@ -629,11 +635,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        controls.setReturningAttributes( new String[]{ "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(objectClass=nothing)", controls );
+            .search( "cn=schema", "(objectClass=nothing)", controls );
 
         while ( results.hasMore() )
         {
@@ -651,11 +658,12 @@ public class SchemaServiceIT extends Abs
     {
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
-        controls.setReturningAttributes( new String[]{ "+" } );
-        
+        controls.setReturningAttributes( new String[]
+            { "+" } );
+
         Map<String, Attributes> subSchemaEntry = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getRootContext( getService() )
-                .search( "cn=schema", "(&(objectClass=*)(objectClass=top))", controls );
+            .search( "cn=schema", "(&(objectClass=*)(objectClass=top))", controls );
 
         while ( results.hasMore() )
         {
@@ -680,7 +688,7 @@ public class SchemaServiceIT extends Abs
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
         NamingEnumeration<SearchResult> results = getSystemContext( getService() )
-                    .search( "", "(seeAlso=cn=Good One,ou=people,o=sevenSeas)", controls );
+            .search( "", "(seeAlso=cn=Good One,ou=people,o=sevenSeas)", controls );
 
         while ( results.hasMore() )
         {
@@ -702,7 +710,7 @@ public class SchemaServiceIT extends Abs
         assertTrue( ocs.contains( "person" ) );
         assertTrue( ocs.contains( "organizationalPerson" ) );
 
-        Attribute seeAlso = person.get(  "seeAlso"  );
+        Attribute seeAlso = person.get( "seeAlso" );
         assertTrue( seeAlso.contains( "cn=Good One,ou=people,o=sevenSeas" ) );
         //assertTrue( seeAlso.contains( "cn=Bad E\u00e9k\u00e0,ou=people,o=sevenSeas" ) );
     }
@@ -720,11 +728,12 @@ public class SchemaServiceIT extends Abs
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
-        controls.setReturningAttributes( new String[] { "9.9.9" } );
+        controls.setReturningAttributes( new String[]
+            { "9.9.9" } );
 
         NamingEnumeration<SearchResult> results = getSystemContext( getService() )
-                .search( "", "(objectClass=person)", controls );
-        
+            .search( "", "(objectClass=person)", controls );
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -741,7 +750,7 @@ public class SchemaServiceIT extends Abs
         assertNotNull( person );
         ocs = person.get( "objectClass" );
         assertNull( ocs );
-        
+
         ocs = person.get( "9.9.9" );
         assertNull( ocs );
 
@@ -756,7 +765,7 @@ public class SchemaServiceIT extends Abs
         assertNull( ocs );
     }
 
-    
+
     /**
      * Check that if we request a Attribute which is not an AttributeType,
      * we still get a result
@@ -769,11 +778,12 @@ public class SchemaServiceIT extends Abs
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
-        controls.setReturningAttributes( new String[] { "2.5.6.6" } );
+        controls.setReturningAttributes( new String[]
+            { "2.5.6.6" } );
 
         NamingEnumeration<SearchResult> results = getSystemContext( getService() )
-                .search( "", "(objectClass=person)", controls );
-        
+            .search( "", "(objectClass=person)", controls );
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -790,7 +800,7 @@ public class SchemaServiceIT extends Abs
         assertNotNull( person );
         ocs = person.get( "objectClass" );
         assertNull( ocs );
-        
+
         // We should not get this attribute (it's an ObjectClass)
         ocs = person.get( "2.5.6.6" );
         assertNull( ocs );
@@ -806,7 +816,7 @@ public class SchemaServiceIT extends Abs
         assertNull( ocs );
     }
 
-    
+
     /**
      * Check that if we request a Attribute which is an ObjectClass.
      *
@@ -818,11 +828,12 @@ public class SchemaServiceIT extends Abs
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.ONELEVEL_SCOPE );
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
-        controls.setReturningAttributes( new String[] { "person" } );
+        controls.setReturningAttributes( new String[]
+            { "person" } );
 
         NamingEnumeration<SearchResult> results = getSystemContext( getService() )
-                .search( "", "(objectClass=person)", controls );
-        
+            .search( "", "(objectClass=person)", controls );
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -839,7 +850,7 @@ public class SchemaServiceIT extends Abs
         assertNotNull( person );
         ocs = person.get( "objectClass" );
         assertNull( ocs );
-        
+
         // We should not get this attrinute (it's an ObjectClass)
         ocs = person.get( "2.5.4.46" );
         assertNull( ocs );
@@ -872,7 +883,7 @@ public class SchemaServiceIT extends Abs
         Map<String, Attributes> persons = new HashMap<String, Attributes>();
 
         NamingEnumeration<SearchResult> results = sysRoot.search( "", "(name=person*)", controls );
-        
+
         while ( results.hasMore() )
         {
             SearchResult result = results.next();
@@ -905,9 +916,8 @@ public class SchemaServiceIT extends Abs
         assertTrue( ocs.contains( "organizationalPerson" ) );
         assertTrue( ocs.contains( "inetOrgPerson" ) );
     }
-    
-    
-    
+
+
     /**
      * Search all the entries with a 'metaTop' ObjectClass, or an ObjectClass
      * inheriting from 'metaTop' 
@@ -918,21 +928,21 @@ public class SchemaServiceIT extends Abs
     public void testSearchForMetaTop() throws Exception
     {
         LdapContext schemaRoot = getSchemaContext( getService() );
-        
+
         SearchControls controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         NamingEnumeration<SearchResult> results = schemaRoot.search( "", "(objectClass=top)", controls );
         assertTrue( "Expected some results", results.hasMore() );
-        
+
         controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         results = schemaRoot.search( "", "(objectClass=metaAttributeType)", controls );
         assertTrue( "Expected some results", results.hasMore() );
-        
+
         controls = new SearchControls();
         controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
         results = schemaRoot.search( "", "(objectClass=metaTop)", controls );
         assertTrue( "Expected some results", results.hasMore() );
     }
-    
+
 }



Mime
View raw message