directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r894653 [1/2] - in /directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server: operations/add/ operations/bind/ operations/compare/ operations/delete/ operations/modify/ operations/modifydn/ operatio...
Date Wed, 30 Dec 2009 15:53:39 GMT
Author: kayyagari
Date: Wed Dec 30 15:53:38 2009
New Revision: 894653

URL: http://svn.apache.org/viewvc?rev=894653&view=rev
Log:
o migrated all tests(not all are passing) to use new testing framework

Modified:
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SearchLimitsIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/ssl/StartTlsIT.java
    directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/suites/StockServerISuite2.java

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/add/AddIT.java Wed Dec 30 15:53:38 2009
@@ -29,8 +29,7 @@
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import java.util.HashSet;
-import java.util.Set;
+import java.util.UUID;
 
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
@@ -59,30 +58,28 @@
 import netscape.ldap.LDAPResponseListener;
 import netscape.ldap.LDAPSearchConstraints;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.constants.ServerDNConstants;
 import org.apache.directory.server.core.CoreSession;
-import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
 import org.apache.directory.server.core.LdapPrincipal;
-import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.annotations.ContextEntry;
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.annotations.CreateIndex;
+import org.apache.directory.server.core.annotations.CreatePartition;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
 import org.apache.directory.server.core.integ.FrameworkRunner;
-import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.core.jndi.ServerLdapContext;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
-import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
-import org.apache.directory.server.integ.LdapServerFactory;
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.ldap.handlers.extended.StoredProcedureExtendedOperationHandler;
-import org.apache.directory.server.protocol.shared.transport.TcpTransport;
-import org.apache.directory.server.xdbm.Index;
 import org.apache.directory.shared.ldap.constants.AuthenticationLevel;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
+import org.apache.directory.shared.ldap.csn.Csn;
+import org.apache.directory.shared.ldap.csn.CsnFactory;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.schema.SchemaUtils;
 import org.apache.directory.shared.ldap.util.StringTools;
-import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
@@ -95,58 +92,86 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 674593 $
  */
-@RunWith ( FrameworkRunner.class ) 
-@Factory ( AddIT.Factory.class )
+@RunWith ( FrameworkRunner.class )
+@CreateDS( allowAnonAccess=true, name="AddIT-class",
+    partitions =
+        {
+            @CreatePartition(
+                name = "example",
+                suffix = "dc=example,dc=com",
+                contextEntry = @ContextEntry( 
+                    entryLdif =
+                        "dn: dc=example,dc=com\n" +
+                        "dc: example\n" +
+                        "objectClass: top\n" +
+                        "objectClass: domain\n\n" ),
+                indexes = 
+                {
+                    @CreateIndex( attribute = "objectClass" ),
+                    @CreateIndex( attribute = "dc" ),
+                    @CreateIndex( attribute = "ou" )
+                } ),
+                
+            @CreatePartition(
+                name = "directory",
+                suffix = "dc=directory,dc=apache,dc=org",
+                contextEntry = @ContextEntry( 
+                    entryLdif =
+                        "dn: dc=directory,dc=apache,dc=org\n"+
+                        "dc: directory\n"+
+                        "objectClass: top\n"+
+                        "objectClass: domain\n\n" ),
+                indexes = 
+                {
+                    @CreateIndex( attribute = "objectClass" ),
+                    @CreateIndex( attribute = "dc" ),
+                    @CreateIndex( attribute = "ou" )
+                } )    
+        })
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" )
+    })
+    
 @ApplyLdifs( {
     // Entry # 0
-    "dn: cn=The Person,ou=system\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "cn: The Person\n" +
-    "description: this is a person\n" +
-    "sn: Person\n\n" + 
+    "dn: cn=The Person,ou=system",
+    "objectClass: person",
+    "objectClass: top",
+    "cn: The Person",
+    "description: this is a person",
+    "sn: Person", 
     
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n" +
-    
-    // Entry example.com
-    "dn: dc=example,dc=com\n" +
-    "dc: example\n" +
-    "objectClass: top\n" +
-    "objectClass: domain\n\n" +
-    
-    // Entry directory.apache.org
-    "dn: dc=directory,dc=apache,dc=org\n" +
-    "dc: directory\n" +
-    "objectClass: top\n" +
-    "objectClass: domain\n\n"
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system"
     }
 )
-public class AddIT
+public class AddIT extends AbstractLdapTestUnit
 {
     private static final Logger LOG = LoggerFactory.getLogger( AddIT.class );
     private static final String RDN = "cn=The Person";
@@ -155,63 +180,6 @@
     private static final String BASE_EXAMPLE_COM = "dc=example,dc=com";
     private static final String BASE_DIRECTORY_APACHE_ORG = "dc=directory,dc=apache,dc=org";
 
-
-    public static LdapServer ldapServer;
-
-    
-    /**
-     * The factory
-     *
-     */
-    public static class Factory implements LdapServerFactory
-    {
-        public LdapServer newInstance() throws Exception
-        {
-            DirectoryService service = new DefaultDirectoryService();
-            IntegrationUtils.doDelete( service.getWorkingDirectory() );
-            service.getChangeLog().setEnabled( true );
-            service.setAllowAnonymousAccess( true );
-            service.setShutdownHookEnabled( false );
-
-            JdbmPartition example = new JdbmPartition();
-            example.setCacheSize( 500 );
-            example.setSuffix( BASE_EXAMPLE_COM );
-            example.setId( "example" );
-            Set<Index<?, ServerEntry>> indexedAttrs = new HashSet<Index<?, ServerEntry>>();
-            indexedAttrs.add( new JdbmIndex<String, ServerEntry>( "ou" ) );
-            indexedAttrs.add( new JdbmIndex<String, ServerEntry>( "dc" ) );
-            indexedAttrs.add( new JdbmIndex<String, ServerEntry>( "objectClass" ) );
-            example.setIndexedAttributes( indexedAttrs );
-
-            service.addPartition( example );
-
-            JdbmPartition directory = new JdbmPartition();
-            directory.setCacheSize( 500 );
-            directory.setSuffix( BASE_DIRECTORY_APACHE_ORG );
-            directory.setId( "directory" );
-            Set<Index<?, ServerEntry>> indexedAttrs2 = new HashSet<Index<?, ServerEntry>>();
-            indexedAttrs2.add( new JdbmIndex<String, ServerEntry>( "ou" ) );
-            indexedAttrs2.add( new JdbmIndex<String, ServerEntry>( "dc" ) );
-            indexedAttrs2.add( new JdbmIndex<String, ServerEntry>( "objectClass" ) );
-            directory.setIndexedAttributes( indexedAttrs2 );
-            
-            service.addPartition( directory );
-            
-            // change the working directory to something that is unique
-            // on the system and somewhere either under target directory
-            // or somewhere in a temp area of the machine.
-
-            LdapServer ldapServer = new LdapServer();
-            ldapServer.setDirectoryService( service );
-            int port = AvailablePortFinder.getNextAvailable( 1024 );
-            ldapServer.setTransports( new TcpTransport( port ) );
-            ldapServer.setAllowAnonymousAccess( true );
-            ldapServer.addExtendedOperationHandler( new StoredProcedureExtendedOperationHandler() );
-
-            return ldapServer;
-        }
-    }
-
     
     /**
      * This is the original defect as in JIRA DIREVE-216.
@@ -1241,6 +1209,51 @@
         assertTrue( userPasswordAttribute.contains( StringTools.getBytesUtf8( "ABC" ) ) );
         assertFalse( res.hasMore() );
     }
+    
+    
+    @Test
+    public void testAddEntryUUIDAndCSNAttributes() throws Exception
+    {
+        LDAPConnection con = getWiredConnection( ldapServer );
+        LDAPAttributeSet attrs = new LDAPAttributeSet();
+        LDAPAttribute ocls = new LDAPAttribute( "objectclass", new String[]
+            { "top", "person" } );
+        attrs.add( ocls );
+        attrs.add( new LDAPAttribute( "sn", "Bush" ) );
+        attrs.add( new LDAPAttribute( "cn", "Kate Bush" ) );
+
+        String descr = "a British singer-songwriter with an expressive four-octave voice";
+        attrs.add( new LDAPAttribute( "description", descr ) );
+
+        UUID uuid = UUID.randomUUID();
+        attrs.add( new LDAPAttribute( SchemaConstants.ENTRY_UUID_AT, SchemaUtils.uuidToBytes( uuid ) ) );
+
+        CsnFactory csnFac = new CsnFactory( 0 );
+        Csn csn = csnFac.newInstance();
+        attrs.add( new LDAPAttribute( SchemaConstants.ENTRY_CSN_AT, csn.toString() ) );
+        
+        String dn = "cn=Kate Bush," + BASE;
+        LDAPEntry kate = new LDAPEntry( dn, attrs );
+
+        con.add( kate );
+
+        // Analyze entry and description attribute
+        LDAPEntry addedEntry = con.read( dn );
+        assertNotNull( addedEntry );
+        //FIXME the LDAPConnection is not able to read the ENTRY_UUID_AT
+        LDAPAttribute attr = addedEntry.getAttribute( SchemaConstants.ENTRY_UUID_AT );
+        assertNotNull( attr );
+        System.out.println( attr.getByteValueArray()[0] );
+        assertEquals( uuid, UUID.nameUUIDFromBytes( attr.getByteValueArray()[0] ) );
+
+        attr = addedEntry.getAttribute( SchemaConstants.ENTRY_CSN_AT );
+        assertNotNull( attr );
+        assertEquals( csn.toString(), new String( attr.getStringValueArray()[0] ) );
+        
+        // Remove entry
+        con.delete( dn );
+        con.disconnect();
+    }
 
     
     protected Attributes getPersonAttributes( String sn, String cn )

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/BindIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,10 @@
 package org.apache.directory.server.operations.bind;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
 import javax.naming.AuthenticationException;
 
 import netscape.ldap.LDAPConnection;
@@ -27,18 +31,12 @@
 import netscape.ldap.LDAPControl;
 import netscape.ldap.LDAPException;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-
 
 /**
  * Tests the server to make sure standard compare operations work properly.
@@ -46,41 +44,38 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.CLASS )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: extensibleObject\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "userPassword: secret\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n"
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: extensibleObject",
+    "objectClass: uidObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "userPassword: secret",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system"
     }
 )
-public class BindIT
+public class BindIT extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-    
 
     /**
      * Test with bindDn which is not even found under any namingContext of the

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/bind/SimpleBindIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,10 @@
 package org.apache.directory.server.operations.bind;
 
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import java.util.Hashtable;
 
 import javax.naming.AuthenticationException;
@@ -38,27 +42,16 @@
 import netscape.ldap.LDAPConnection;
 import netscape.ldap.LDAPEntry;
 import netscape.ldap.LDAPException;
-import netscape.ldap.LDAPSearchResult;
 import netscape.ldap.LDAPSearchResults;
 import netscape.ldap.LDAPUrl;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.ldap.LdapServer;
-
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
-
 
 /**
  * An {@link AbstractServerTest} testing SIMPLE authentication.
@@ -66,22 +59,21 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.CLASS )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=hnelson,ou=users,ou=system\n" +
-    "objectClass: inetOrgPerson\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "userPassword: secret\n" +
-    "uid: hnelson\n" +
-    "cn: Horatio Nelson\n" +
-    "sn: Nelson\n\n"
+    "dn: uid=hnelson,ou=users,ou=system",
+    "objectClass: inetOrgPerson",
+    "objectClass: organizationalPerson",
+    "objectClass: person",
+    "objectClass: top",
+    "userPassword: secret",
+    "uid: hnelson",
+    "cn: Horatio Nelson",
+    "sn: Nelson"
     }
 )
-public class SimpleBindIT
+public class SimpleBindIT extends AbstractLdapTestUnit
 {
     private static final String BASE = "ou=users,ou=system";
 

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/CompareIT.java Wed Dec 30 15:53:38 2009
@@ -60,29 +60,29 @@
 @RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n"
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system"
     }
 )
 public class CompareIT extends AbstractLdapTestUnit

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/compare/MatchingRuleCompareIT.java Wed Dec 30 15:53:38 2009
@@ -47,19 +47,19 @@
 @RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: cn=Tori Amos,ou=system\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "telephoneNumber: 1234567890\n" +
-    "userPassword: Secret1!\n" +
-    "cn: Tori Amos\n" +
-    "sn: Amos\n\n" + 
+    "dn: cn=Tori Amos,ou=system",
+    "objectClass: person",
+    "objectClass: top",
+    "telephoneNumber: 1234567890",
+    "userPassword: Secret1!",
+    "cn: Tori Amos",
+    "sn: Amos", 
     // Entry # 2
-    "dn: cn=Artists,ou=system\n" +
-    "objectClass: groupOfNames\n" +
-    "objectClass: top\n" +
-    "cn: Artists\n" +
-    "member: cn=Tori Amos,ou=system\n\n"
+    "dn: cn=Artists,ou=system",
+    "objectClass: groupOfNames",
+    "objectClass: top",
+    "cn: Artists",
+    "member: cn=Tori Amos,ou=system"
     }
 )
 public class MatchingRuleCompareIT extends AbstractLdapTestUnit

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/delete/DeleteIT.java Wed Dec 30 15:53:38 2009
@@ -57,31 +57,31 @@
 @RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n" 
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system" 
     }
 )
 public class DeleteIT extends AbstractLdapTestUnit

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/IllegalModificationIT.java Wed Dec 30 15:53:38 2009
@@ -60,11 +60,11 @@
 @RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: cn=Kate Bush,ou=system\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "cn: Kate Bush\n" +
-    "sn: Bush\n\n" 
+    "dn: cn=Kate Bush,ou=system",
+    "objectClass: person",
+    "objectClass: top",
+    "cn: Kate Bush",
+    "sn: Bush" 
     }
 )
 public class IllegalModificationIT extends AbstractLdapTestUnit

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyAddIT.java Wed Dec 30 15:53:38 2009
@@ -65,22 +65,22 @@
 @RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: cn=Tori Amos,ou=system\n" +
-    "objectClass: inetOrgPerson\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "description: an American singer-songwriter\n" +
-    "cn: Tori Amos\n" +
-    "sn: Amos\n\n" + 
+    "dn: cn=Tori Amos,ou=system",
+    "objectClass: inetOrgPerson",
+    "objectClass: organizationalPerson",
+    "objectClass: person",
+    "objectClass: top",
+    "description: an American singer-songwriter",
+    "cn: Tori Amos",
+    "sn: Amos", 
     // Entry # 2
-    "dn: cn=Debbie Harry,ou=system\n" +
-    "objectClass: inetOrgPerson\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "cn: Debbie Harry\n" +
-    "sn: Harry\n\n" 
+    "dn: cn=Debbie Harry,ou=system",
+    "objectClass: inetOrgPerson",
+    "objectClass: organizationalPerson",
+    "objectClass: person",
+    "objectClass: top",
+    "cn: Debbie Harry",
+    "sn: Harry" 
     }
 )
 public class ModifyAddIT  extends AbstractLdapTestUnit

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReferralIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,11 @@
 package org.apache.directory.server.operations.modify;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
 import javax.naming.ReferralException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.BasicAttribute;
@@ -27,24 +32,6 @@
 import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
-
-import org.apache.directory.server.ldap.LdapServer;
-import org.apache.directory.server.operations.compare.CompareIT;
-import org.apache.directory.shared.ldap.message.ResultCodeEnum;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-
 import netscape.ldap.LDAPAttribute;
 import netscape.ldap.LDAPConnection;
 import netscape.ldap.LDAPConstraints;
@@ -53,6 +40,16 @@
 import netscape.ldap.LDAPResponse;
 import netscape.ldap.LDAPResponseListener;
 
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.operations.compare.CompareIT;
+import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
 
 /** 
  * A test taken from DIRSERVER-630: If one tries to add an attribute to an 
@@ -75,41 +72,38 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: $
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: extensibleObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n"
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: extensibleObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system"
     }
 )
-public class ModifyReferralIT 
+public class ModifyReferralIT extends AbstractLdapTestUnit 
 {
     private static final Logger LOG = LoggerFactory.getLogger( CompareIT.class );
     
-    public static LdapServer ldapServer;
-    
 
     /**
      * Tests modify operation on referral entry with the ManageDsaIT control.

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyRemoveIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,14 @@
 package org.apache.directory.server.operations.modify;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -34,22 +42,12 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
 
 
 /**
@@ -59,26 +57,22 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: cn=Tori Amos,ou=system\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "description: an American singer-songwriter\n" +
-    "cn: Tori Amos\n" +
-    "sn: Amos\n\n"
+    "dn: cn=Tori Amos,ou=system",
+    "objectClass: person",
+    "objectClass: top",
+    "description: an American singer-songwriter",
+    "cn: Tori Amos",
+    "sn: Amos"
     }
 )
-public class ModifyRemoveIT
+public class ModifyRemoveIT extends AbstractLdapTestUnit
 {
     private static final String BASE = "ou=system";
     private static final String RDN = "cn=Tori Amos";
 
-    
-    public static LdapServer ldapServer;
-    
     /**
      * Enable the krb5kdc schema.
      */

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modify/ModifyReplaceIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,12 @@
 package org.apache.directory.server.operations.modify;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
@@ -35,20 +41,19 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
 import org.apache.directory.server.core.DefaultDirectoryService;
 import org.apache.directory.server.core.DirectoryService;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.annotations.CreateDS;
 import org.apache.directory.server.core.entry.ServerEntry;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.server.core.integ.IntegrationUtils;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.core.integ.annotations.Factory;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmIndex;
 import org.apache.directory.server.core.partition.impl.btree.jdbm.JdbmPartition;
 import org.apache.directory.server.integ.LdapServerFactory;
-import org.apache.directory.server.integ.SiRunner;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
 import org.apache.directory.server.ldap.LdapServer;
 import org.apache.directory.server.ldap.handlers.bind.MechanismHandler;
 import org.apache.directory.server.ldap.handlers.bind.SimpleMechanismHandler;
@@ -65,10 +70,6 @@
 import org.apache.mina.util.AvailablePortFinder;
 import org.junit.Test;
 import org.junit.runner.RunWith;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertEquals;
 
 
 /**
@@ -77,33 +78,36 @@
  * Demonstrates DIRSERVER-646 ("Replacing an unknown attribute with
  * no values (deletion) causes an error").
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
-@Factory ( ModifyReplaceIT.Factory.class )
+@RunWith ( FrameworkRunner.class ) 
+@CreateDS( name="ModifyReplaceIT-class" )
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" ), 
+        @CreateTransport( protocol = "LDAPS" ) 
+    })
 @ApplyLdifs( {
     // Entry # 1
-    "dn: cn=Kate Bush,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "sn: Bush\n" +
-    "cn: Kate Bush\n\n" +
+    "dn: cn=Kate Bush,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "sn: Bush",
+    "cn: Kate Bush",
 
     // Entry # 2
-    "dn: cn=Kim Wilde,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: organizationalPerson \n" +
-    "objectClass: inetOrgPerson \n" +
-    "sn: Wilde\n" +
-    "cn: Kim Wilde\n\n" 
+    "dn: cn=Kim Wilde,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: organizationalPerson ",
+    "objectClass: inetOrgPerson ",
+    "sn: Wilde",
+    "cn: Kim Wilde" 
     }
 )
-public class ModifyReplaceIT 
+public class ModifyReplaceIT extends AbstractLdapTestUnit 
 {
     private static final String BASE = "ou=system";
 
-    public static LdapServer ldapServer;
-    
     
     public static class Factory implements LdapServerFactory
     {

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyDnReferralIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,12 @@
 package org.apache.directory.server.operations.modifydn;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.fail;
+
 import javax.naming.ReferralException;
 import javax.naming.ldap.LdapContext;
 
@@ -32,23 +38,15 @@
 import netscape.ldap.LDAPResponseListener;
 import netscape.ldap.LDAPSearchConstraints;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredConnection;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContextThrowOnRefferal;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.fail;
-
 
 /**
  * Tests the server to make sure standard compare operations work properly.
@@ -56,52 +54,49 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$, $Date$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     
     // Entry # 2
-    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: computers\n" +
-    "description: Computers for Alex\n" +
-    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system\n\n" + 
+    "dn: ou=Computers,uid=akarasulu,ou=users,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: computers",
+    "description: Computers for Alex",
+    "seeAlso: ou=Machines,uid=akarasulu,ou=users,ou=system", 
     
     // Entry # 3
-    "dn: uid=akarasuluref,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: referral\n" +
-    "objectClass: top\n" +
-    "uid: akarasuluref\n" +
-    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system\n" + 
-    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system\n" +
-    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system\n\n" +
+    "dn: uid=akarasuluref,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: referral",
+    "objectClass: top",
+    "uid: akarasuluref",
+    "ref: ldap://localhost:10389/uid=akarasulu,ou=users,ou=system", 
+    "ref: ldap://foo:10389/uid=akarasulu,ou=users,ou=system",
+    "ref: ldap://bar:10389/uid=akarasulu,ou=users,ou=system",
     
     // Entry # 4
-    "dn: uid=elecharny,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: elecharny\n" +
-    "cn: Emmanuel Lecharny\n" +
-    "sn: lecharny\n\n"
+    "dn: uid=elecharny,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: elecharny",
+    "cn: Emmanuel Lecharny",
+    "sn: lecharny"
     }
 )
-public class ModifyDnReferralIT
+public class ModifyDnReferralIT extends AbstractLdapTestUnit
 {
     private static final Logger LOG = LoggerFactory.getLogger( ModifyDnReferralIT.class );
     
-    public static LdapServer ldapServer;
-    
 
     /**
      * Tests ModifyDN operation on referral entry with the ManageDsaIT control.

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/ModifyRdnIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,13 @@
 package org.apache.directory.server.operations.modifydn;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import javax.naming.NameNotFoundException;
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -33,20 +40,14 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.annotations.CreateLdapServer;
+import org.apache.directory.server.annotations.CreateTransport;
+import org.apache.directory.server.core.annotations.CreateDS;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.fail;
-
 
 /**
  * Test case with different modify DN operations on a person entry.
@@ -55,14 +56,17 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 679049 $
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
-public class ModifyRdnIT 
+@RunWith ( FrameworkRunner.class )
+@CreateDS( name="ModifyRdnIT-class" )
+@CreateLdapServer ( 
+    transports = 
+    {
+        @CreateTransport( protocol = "LDAP" )
+    })
+public class ModifyRdnIT extends AbstractLdapTestUnit
 {
     private static final String BASE = "ou=system";
 
-    public static LdapServer ldapServer;
-    
     
     /**
      * Create attributes for a person entry.

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/modifydn/MoveIT.java Wed Dec 30 15:53:38 2009
@@ -20,24 +20,22 @@
 package org.apache.directory.server.operations.modifydn;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 
 /**
  * Test case with different modify DN operations which move the entry under a 
@@ -46,32 +44,29 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 679049 $
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 1
-    "dn: uid=akarasulu,ou=users,ou=system\n" +
-    "objectClass: uidObject\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "uid: akarasulu\n" +
-    "cn: Alex Karasulu\n" +
-    "sn: karasulu\n\n" + 
+    "dn: uid=akarasulu,ou=users,ou=system",
+    "objectClass: uidObject",
+    "objectClass: person",
+    "objectClass: top",
+    "uid: akarasulu",
+    "cn: Alex Karasulu",
+    "sn: karasulu", 
     // Entry # 2
-    "dn: ou=NewSuperior,ou=system\n" +
-    "objectClass: organizationalUnit\n" +
-    "objectClass: top\n" +
-    "ou: NewSuperior\n\n"
+    "dn: ou=NewSuperior,ou=system",
+    "objectClass: organizationalUnit",
+    "objectClass: top",
+    "ou: NewSuperior"
     }
 )
-public class MoveIT 
+public class MoveIT extends AbstractLdapTestUnit 
 {
     private static final String DN = "uid=akarasulu,ou=users,ou=system";
     private static final String NEW_DN = "uid=akarasulu,ou=NewSuperior,ou=system";
     private static final String NEW_DN2 = "uid=elecharny,ou=NewSuperior,ou=system";
     
-    public static LdapServer ldapServer;
-    
 
     @Test
     public void testMoveNoRdnChange() throws Exception

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/NegationSearchIT.java Wed Dec 30 15:53:38 2009
@@ -20,30 +20,25 @@
 package org.apache.directory.server.operations.search;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
 import java.util.HashSet;
 import java.util.Set;
 
 import javax.naming.NamingEnumeration;
+import javax.naming.directory.DirContext;
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.core.integ.annotations.Factory;
-import org.apache.directory.server.integ.SiRunner;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import javax.naming.directory.DirContext;
-
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-
 
 /**
  * A set of tests to make sure the negation operator is working 
@@ -54,62 +49,58 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 519077 $
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
-@Factory ( IndexedNegationSearchIT.Factory.class )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
-    "dn: ou=actors,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: organizationalUnit\n" +
-    "ou: actors\n\n" +
-
-    "dn: uid=jblack,ou=actors,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: uidObject\n" +
-    "uid: jblack\n" +
-    "ou: comedy\n" +
-    "ou: adventure\n" +
-    "cn: Jack Black\n" +
-    "sn: Black\n\n" +
-
-    "dn: uid=bpitt,ou=actors,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: uidObject\n" +
-    "uid: bpitt\n" +
-    "ou: drama\n" +
-    "ou: adventure\n" +
-    "cn: Brad Pitt\n" +
-    "sn: Pitt\n\n" +
-
-    "dn: uid=gcloony,ou=actors,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: uidObject\n" +
-    "uid: gcloony\n" +
-    "ou: drama\n" +
-    "cn: Goerge Cloony\n" +
-    "sn: Cloony\n\n" +
-
-    "dn: uid=jnewbie,ou=actors,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: organizationalPerson\n" +
-    "objectClass: uidObject\n" +
-    "uid: jnewbie\n" +
-    "cn: Joe Newbie\n" +
-    "sn: Newbie\n\n" 
+    "dn: ou=actors,ou=system",
+    "objectClass: top",
+    "objectClass: organizationalUnit",
+    "ou: actors",
+
+    "dn: uid=jblack,ou=actors,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: organizationalPerson",
+    "objectClass: uidObject",
+    "uid: jblack",
+    "ou: comedy",
+    "ou: adventure",
+    "cn: Jack Black",
+    "sn: Black",
+
+    "dn: uid=bpitt,ou=actors,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: organizationalPerson",
+    "objectClass: uidObject",
+    "uid: bpitt",
+    "ou: drama",
+    "ou: adventure",
+    "cn: Brad Pitt",
+    "sn: Pitt",
+
+    "dn: uid=gcloony,ou=actors,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: organizationalPerson",
+    "objectClass: uidObject",
+    "uid: gcloony",
+    "ou: drama",
+    "cn: Goerge Cloony",
+    "sn: Cloony",
+
+    "dn: uid=jnewbie,ou=actors,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: organizationalPerson",
+    "objectClass: uidObject",
+    "uid: jnewbie",
+    "cn: Joe Newbie",
+    "sn: Newbie" 
 
     }
 )
-public class NegationSearchIT 
+public class NegationSearchIT extends AbstractLdapTestUnit 
 {
-    public static LdapServer ldapServer;
-
     
     /**
      * Tests to make sure a negated search for actors without ou

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/PersistentSearchIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,12 @@
 package org.apache.directory.server.operations.search;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.assertTrue;
+
 import java.util.ArrayList;
 import java.util.EventObject;
 import java.util.List;
@@ -40,30 +46,20 @@
 import javax.naming.ldap.HasControls;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.event.EventService;
 import org.apache.directory.server.core.event.RegistrationEntry;
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.codec.search.controls.ChangeType;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControlCodec;
 import org.apache.directory.shared.ldap.codec.search.controls.entryChange.EntryChangeControlDecoder;
 import org.apache.directory.shared.ldap.message.control.PersistentSearchControl;
-
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
-
 
 /**
  * Test case which tests the correct operation of the persistent search control.
@@ -71,19 +67,18 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     // Entry # 2
-    "dn: cn=Tori Amos,ou=system\n" +
-    "objectClass: person\n" +
-    "objectClass: top\n" +
-    "cn: Tori Amos\n" +
-    "description: an American singer-songwriter\n" +
-    "sn: Amos\n\n"
+    "dn: cn=Tori Amos,ou=system",
+    "objectClass: person",
+    "objectClass: top",
+    "cn: Tori Amos",
+    "description: an American singer-songwriter",
+    "sn: Amos"
     }
 )
-public class PersistentSearchIT
+public class PersistentSearchIT extends AbstractLdapTestUnit
 {
     private static final Logger LOG = LoggerFactory.getLogger( PersistentSearchIT.class );
     
@@ -91,8 +86,6 @@
     private static final String PERSON_DESCRIPTION = "an American singer-songwriter";
     private static final String RDN = "cn=Tori Amos";
 
-    public static LdapServer ldapServer;
-    
 
     /**
      * Creation of required attributes of a person entry.

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/ReferralSearchIT.java Wed Dec 30 15:53:38 2009
@@ -43,10 +43,10 @@
 import javax.naming.ldap.LdapContext;
 import javax.naming.ldap.ManageReferralControl;
 
+import org.apache.directory.server.core.annotations.ApplyLdifs;
 import org.apache.directory.server.core.entry.DefaultServerEntry;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.ldif.LdifEntry;
 import org.apache.directory.shared.ldap.ldif.LdifReader;
 import org.junit.Before;
@@ -60,64 +60,62 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 545029 $
  */
-@RunWith ( SiRunner.class )
+@RunWith ( FrameworkRunner.class )
 @ApplyLdifs( {
     // Add new ref for ou=RemoteUsers
-    "dn: ou=RemoteUsers,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: referral\n" +
-    "objectClass: extensibleObject\n" +
-    "ou: RemoteUsers\n" +
-    "ref: ldap://fermi:10389/ou=users,ou=system\n" +
-    "ref: ldap://hertz:10389/ou=users,dc=example,dc=com\n" +
-    "ref: ldap://maxwell:10389/ou=users,ou=system\n\n" +
-    
-    "dn: c=France,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: country\n" +
-    "c: France\n\n" +
-    
-    "dn: c=USA,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: country\n" +
-    "c: USA\n\n" +
-    
-    "dn: l=Paris,c=france,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: locality\n" +
-    "l: Paris\n\n" +
-    
-    "dn: l=Jacksonville,c=usa,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: locality\n" +
-    "l: Jacksonville\n\n" +
-    
-    "dn: cn=emmanuel lecharny,l=paris,c=france,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: residentialPerson\n" +
-    "cn: emmanuel lecharny\n" +
-    "sn: elecharny\n" +
-    "l: Paris\n\n" +
-    
-    "dn: cn=alex karasulu,l=jacksonville,c=usa,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: person\n" +
-    "objectClass: residentialPerson\n" +
-    "cn: alex karasulu\n" +
-    "sn: karasulu\n" +
-    "l: Jacksonville\n\n" +
-    
-    "dn: ou=Countries,ou=system\n" +
-    "objectClass: top\n" +
-    "objectClass: organizationalUnit\n" +
-    "ou: Countries\n\n"
+    "dn: ou=RemoteUsers,ou=system",
+    "objectClass: top",
+    "objectClass: referral",
+    "objectClass: extensibleObject",
+    "ou: RemoteUsers",
+    "ref: ldap://fermi:10389/ou=users,ou=system",
+    "ref: ldap://hertz:10389/ou=users,dc=example,dc=com",
+    "ref: ldap://maxwell:10389/ou=users,ou=system",
+    
+    "dn: c=France,ou=system",
+    "objectClass: top",
+    "objectClass: country",
+    "c: France",
+    
+    "dn: c=USA,ou=system",
+    "objectClass: top",
+    "objectClass: country",
+    "c: USA",
+    
+    "dn: l=Paris,c=france,ou=system",
+    "objectClass: top",
+    "objectClass: locality",
+    "l: Paris",
+    
+    "dn: l=Jacksonville,c=usa,ou=system",
+    "objectClass: top",
+    "objectClass: locality",
+    "l: Jacksonville",
+    
+    "dn: cn=emmanuel lecharny,l=paris,c=france,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: residentialPerson",
+    "cn: emmanuel lecharny",
+    "sn: elecharny",
+    "l: Paris",
+    
+    "dn: cn=alex karasulu,l=jacksonville,c=usa,ou=system",
+    "objectClass: top",
+    "objectClass: person",
+    "objectClass: residentialPerson",
+    "cn: alex karasulu",
+    "sn: karasulu",
+    "l: Jacksonville",
+    
+    "dn: ou=Countries,ou=system",
+    "objectClass: top",
+    "objectClass: organizationalUnit",
+    "ou: Countries"
     }
 )
-public class ReferralSearchIT
+public class ReferralSearchIT extends AbstractLdapTestUnit
 {
-    public static LdapServer ldapServer;
-
     
     @Before
     public void setupReferrals() throws Exception

Modified: directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java?rev=894653&r1=894652&r2=894653&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java (original)
+++ directory/apacheds/branches/apacheds-schema/server-integ/src/test/java/org/apache/directory/server/operations/search/SchemaSearchIT.java Wed Dec 30 15:53:38 2009
@@ -20,6 +20,13 @@
 package org.apache.directory.server.operations.search;
 
 
+import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.fail;
+
 import javax.naming.NamingEnumeration;
 import javax.naming.directory.Attributes;
 import javax.naming.directory.BasicAttributes;
@@ -27,22 +34,12 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import org.apache.directory.server.core.integ.Level;
-import org.apache.directory.server.core.integ.annotations.ApplyLdifs;
-import org.apache.directory.server.core.integ.annotations.CleanupLevel;
-import org.apache.directory.server.integ.SiRunner;
-import org.apache.directory.server.ldap.LdapServer;
+import org.apache.directory.server.core.annotations.ApplyLdifs;
+import org.apache.directory.server.core.integ.AbstractLdapTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.apache.directory.server.integ.ServerIntegrationUtils.getWiredContext;
-
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertNotNull;
-
 
 /**
  * Test case with different search operations on the cn=schema entry. 
@@ -51,124 +48,120 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev: 569048 $
  */
-@RunWith ( SiRunner.class ) 
-@CleanupLevel ( Level.SUITE )
+@RunWith ( FrameworkRunner.class ) 
 @ApplyLdifs( {
     
     // Bogus AD schema (not real)
     
-    "dn: cn=active-directory, ou=schema\n" +
-    "objectclass: metaSchema\n" +
-    "objectclass: top\n" +
-    "cn: active-directory\n" +
-    "m-dependencies: core\n\n" +
-    
-    "dn: ou=attributeTypes, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: attributeTypes\n\n" +
-    
-    "dn: m-oid=1.1, ou=attributeTypes, cn=active-directory, ou=schema\n" +
-    "objectclass: metaAttributeType\n" +
-    "objectclass: metaTop\n" +
-    "objectclass: top\n" +
-    "m-oid: 1.1\n" +
-    "m-name: sAMAccountName\n" +
-    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.15\n\n" +
-    
-    "dn: m-oid=1.2, ou=attributeTypes, cn=active-directory, ou=schema\n" +
-    "objectclass: metaAttributeType\n" +
-    "objectclass: metaTop\n" +
-    "objectclass: top\n" +
-    "m-oid: 1.2\n" +
-    "m-name: pwdLastSet\n" +
-    "m-equality: integerMatch\n" +
-    "m-ordering: integerMatch\n" +
-    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.27\n\n" +
-
-    "dn: m-oid=1.4, ou=attributeTypes, cn=active-directory, ou=schema\n" +
-    "objectclass: metaAttributeType\n" +
-    "objectclass: metaTop\n" +
-    "objectclass: top\n" +
-    "m-oid: 1.4\n" +
-    "m-name: useraccountcontrol\n" +
-    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.27\n\n" +
-
-    "dn: m-oid=1.5, ou=attributeTypes, cn=active-directory, ou=schema\n" +
-    "objectclass: metaAttributeType\n" +
-    "objectclass: metaTop\n" +
-    "objectclass: top\n" +
-    "m-oid: 1.5\n" +
-    "m-name: SourceAD\n" +
-    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.15\n" +
-    "m-length: 0\n\n" +
-
-    "dn: ou=comparators, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: comparators\n\n" +
-
-    "dn: ou=ditContentRules, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: ditContentRules\n\n" +
-
-    "dn: ou=ditStructureRules, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: ditStructureRules\n\n" +
-
-    "dn: ou=matchingRules, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: matchingRules\n\n" +
-    
-    "dn: ou=nameForms, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: nameForms\n\n" +
-
-    "dn: ou=normalizers, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: normalizers\n\n" +
-
-    "dn: ou=objectClasses, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: objectClasses\n\n" +
-
-    "dn: m-oid=1.3, ou=objectClasses, cn=active-directory, ou=schema\n" +
-    "objectclass: metaObjectClass\n" +
-    "objectclass: metaTop\n" +
-    "objectclass: top\n" +
-    "m-oid: 1.3\n" +
-    "m-name: personActiveDirectory\n" +
-    "m-supObjectClass: person\n" +
-    "m-must: pwdLastSet\n" +
-    "m-must: sAMAccountName\n" +
-    "m-must: useraccountcontrol\n" +
-    "m-must: SourceAD\n\n" +
-
-    "dn: ou=syntaxCheckers, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: syntaxCheckers\n\n" +
-
-    "dn: ou=syntaxes, cn=active-directory, ou=schema\n" +
-    "objectclass: organizationalUnit\n" +
-    "objectclass: top\n" +
-    "ou: syntaxes\n\n"
+    "dn: cn=active-directory, ou=schema",
+    "objectclass: metaSchema",
+    "objectclass: top",
+    "cn: active-directory",
+    "m-dependencies: core",
+    
+    "dn: ou=attributeTypes, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: attributeTypes",
+    
+    "dn: m-oid=1.1, ou=attributeTypes, cn=active-directory, ou=schema",
+    "objectclass: metaAttributeType",
+    "objectclass: metaTop",
+    "objectclass: top",
+    "m-oid: 1.1",
+    "m-name: sAMAccountName",
+    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.15",
+    
+    "dn: m-oid=1.2, ou=attributeTypes, cn=active-directory, ou=schema",
+    "objectclass: metaAttributeType",
+    "objectclass: metaTop",
+    "objectclass: top",
+    "m-oid: 1.2",
+    "m-name: pwdLastSet",
+    "m-equality: integerMatch",
+    "m-ordering: integerMatch",
+    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.27",
+
+    "dn: m-oid=1.4, ou=attributeTypes, cn=active-directory, ou=schema",
+    "objectclass: metaAttributeType",
+    "objectclass: metaTop",
+    "objectclass: top",
+    "m-oid: 1.4",
+    "m-name: useraccountcontrol",
+    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.27",
+
+    "dn: m-oid=1.5, ou=attributeTypes, cn=active-directory, ou=schema",
+    "objectclass: metaAttributeType",
+    "objectclass: metaTop",
+    "objectclass: top",
+    "m-oid: 1.5",
+    "m-name: SourceAD",
+    "m-syntax: 1.3.6.1.4.1.1466.115.121.1.15",
+    "m-length: 0",
+
+    "dn: ou=comparators, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: comparators",
+
+    "dn: ou=ditContentRules, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: ditContentRules",
+
+    "dn: ou=ditStructureRules, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: ditStructureRules",
+
+    "dn: ou=matchingRules, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: matchingRules",
+    
+    "dn: ou=nameForms, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: nameForms",
+
+    "dn: ou=normalizers, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: normalizers",
+
+    "dn: ou=objectClasses, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: objectClasses",
+
+    "dn: m-oid=1.3, ou=objectClasses, cn=active-directory, ou=schema",
+    "objectclass: metaObjectClass",
+    "objectclass: metaTop",
+    "objectclass: top",
+    "m-oid: 1.3",
+    "m-name: personActiveDirectory",
+    "m-supObjectClass: person",
+    "m-must: pwdLastSet",
+    "m-must: sAMAccountName",
+    "m-must: useraccountcontrol",
+    "m-must: SourceAD",
+
+    "dn: ou=syntaxCheckers, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: syntaxCheckers",
+
+    "dn: ou=syntaxes, cn=active-directory, ou=schema",
+    "objectclass: organizationalUnit",
+    "objectclass: top",
+    "ou: syntaxes"
     }
 )
-public class SchemaSearchIT 
+public class SchemaSearchIT extends AbstractLdapTestUnit 
 {
     private static final String DN = "cn=schema";
     private static final String FILTER = "(objectclass=subschema)";
 
-    
-    public static LdapServer ldapServer;
-    
 
     protected void checkForAttributes( Attributes attrs, String[] attrNames )
     {



Mime
View raw message