directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r894270 - in /directory/apacheds/branches/apacheds-schema: core-integ/ core-integ/file:/ core-integ/file:/Users/ core-integ/file:/Users/elecharny/ core-integ/file:/Users/elecharny/apacheds/ core-integ/file:/Users/elecharny/apacheds/new-sche...
Date Mon, 28 Dec 2009 23:10:55 GMT
Author: elecharny
Date: Mon Dec 28 23:10:54 2009
New Revision: 894270

URL: http://svn.apache.org/viewvc?rev=894270&view=rev
Log:
Started to migrate core-integ test to use the new test-framework

Added:
    directory/apacheds/branches/apacheds-schema/core-integ/file:/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/apacheds/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/apacheds/new-schema/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/apacheds/new-schema/apacheds/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/apacheds/new-schema/apacheds/core-annotations/
    directory/apacheds/branches/apacheds-schema/core-integ/file:/Users/elecharny/apacheds/new-schema/apacheds/core-annotations/target/
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite2.java
    directory/apacheds/branches/apacheds-schema/test-framework/file:/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/apacheds/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/apacheds/new-schema/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/apacheds/new-schema/apacheds/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/apacheds/new-schema/apacheds/core-annotations/
    directory/apacheds/branches/apacheds-schema/test-framework/file:/Users/elecharny/apacheds/new-schema/apacheds/core-annotations/target/
Modified:
    directory/apacheds/branches/apacheds-schema/core-integ/pom.xml
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
    directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
    directory/apacheds/branches/apacheds-schema/test-framework/pom.xml

Modified: directory/apacheds/branches/apacheds-schema/core-integ/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/pom.xml?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/pom.xml Mon Dec 28 23:10:54 2009
@@ -71,6 +71,11 @@
       <version>${pom.version}</version>
     </dependency>  
 
+    <dependency>
+      <groupId>org.apache.directory.server</groupId>
+      <artifactId>apacheds-test-framework</artifactId>
+      <version>${pom.version}</version>
+    </dependency>  
 
     <dependency>
       <groupId>org.apache.directory.server</groupId>

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/authn/SimpleAuthenticationIT.java
Mon Dec 28 23:10:54 2009
@@ -20,24 +20,12 @@
 package org.apache.directory.server.core.authn;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.jndi.ServerLdapContext;
-
-import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
 import static org.apache.directory.server.core.integ.IntegrationUtils.apply;
-
-import org.apache.directory.shared.ldap.name.LdapDN;
-import org.apache.directory.shared.ldap.util.ArrayUtils;
-import org.apache.directory.shared.ldap.util.StringTools;
-
-import static org.junit.Assert.assertTrue;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getUserAddLdif;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
-import org.junit.Test;
-import org.junit.runner.RunWith;
-
 import javax.naming.NamingException;
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
@@ -46,6 +34,15 @@
 import javax.naming.directory.ModificationItem;
 import javax.naming.ldap.LdapContext;
 
+import org.apache.directory.server.core.integ.AbstractTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.server.core.jndi.ServerLdapContext;
+import org.apache.directory.shared.ldap.name.LdapDN;
+import org.apache.directory.shared.ldap.util.ArrayUtils;
+import org.apache.directory.shared.ldap.util.StringTools;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+
 
 /**
  * A set of simple tests to make sure simple authentication is working as it
@@ -54,12 +51,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith( CiRunner.class )
-public class SimpleAuthenticationIT
+@RunWith( FrameworkRunner.class )
+public class SimpleAuthenticationIT extends AbstractTestUnit
 {
-    public static DirectoryService service;
-
-
     /**
      * Checks all attributes of the admin account entry minus the userPassword
      * attribute.

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/collective/CollectiveAttributeServiceIT.java
Mon Dec 28 23:10:54 2009
@@ -20,18 +20,15 @@
 package org.apache.directory.server.core.collective;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
-import org.apache.directory.server.core.integ.SetupMode;
-import org.apache.directory.server.core.integ.annotations.Mode;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
-import static org.junit.Assert.assertTrue;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertNotNull;
 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 org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.HashMap;
+import java.util.Map;
 
 import javax.naming.NamingEnumeration;
 import javax.naming.NamingException;
@@ -44,8 +41,11 @@
 import javax.naming.directory.SearchControls;
 import javax.naming.directory.SearchResult;
 
-import java.util.HashMap;
-import java.util.Map;
+import org.apache.directory.server.core.integ.AbstractTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -54,72 +54,64 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-@Mode ( SetupMode.ROLLBACK )
-public class CollectiveAttributeServiceIT
+@RunWith ( FrameworkRunner.class )
+public class CollectiveAttributeServiceIT extends AbstractTestUnit
 {
-    public static DirectoryService service;
-
-
-    public Attributes getTestEntry( String cn )
+    private Attributes getTestEntry( String cn ) throws NamingException
     {
-        Attributes subentry = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
-        objectClass.add( "top" );
-        objectClass.add( "person" );
-        subentry.put( objectClass );
-        subentry.put( "cn", cn );
-        subentry.put( "sn", "testentry" );
+        Attributes subentry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: person",
+            "cn", cn ,
+            "sn: testentry" );
+        
         return subentry;
     }
 
 
-    public Attributes getTestSubentry()
+    private Attributes getTestSubentry()  throws NamingException
     {
-        Attributes subentry = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
-        objectClass.add( "top" );
-        objectClass.add( "subentry" );
-        objectClass.add( "collectiveAttributeSubentry" );
-        subentry.put( objectClass );
-        subentry.put( "c-ou", "configuration" );
-        subentry.put( "subtreeSpecification", "{ base \"ou=configuration\" }" );
-        subentry.put( "cn", "testsubentry" );
+        Attributes subentry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry",
+            "c-ou: configuration",
+            "subtreeSpecification: { base \"ou=configuration\" }",
+            "cn: testsubentry" );
+        
         return subentry;
     }
 
 
-    public Attributes getTestSubentry2()
+    private Attributes getTestSubentry2() throws NamingException
     {
-        Attributes subentry = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
-        objectClass.add( "top" );
-        objectClass.add( "subentry" );
-        objectClass.add( "collectiveAttributeSubentry" );
-        subentry.put( objectClass );
-        subentry.put( "c-ou", "configuration2" );
-        subentry.put( "subtreeSpecification", "{ base \"ou=configuration\" }" );
-        subentry.put( "cn", "testsubentry2" );
+        Attributes subentry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry",
+            "c-ou: configuration2",
+            "subtreeSpecification: { base \"ou=configuration\" }",
+            "cn: testsubentry2" );
+        
         return subentry;
     }
 
 
-    public Attributes getTestSubentry3()
+    private Attributes getTestSubentry3() throws NamingException
     {
-        Attributes subentry = new BasicAttributes( true );
-        Attribute objectClass = new BasicAttribute( "objectClass" );
-        objectClass.add( "top" );
-        objectClass.add( "subentry" );
-        objectClass.add( "collectiveAttributeSubentry" );
-        subentry.put( objectClass );
-        subentry.put( "c-st", "FL" );
-        subentry.put( "subtreeSpecification", "{ base \"ou=configuration\" }" );
-        subentry.put( "cn", "testsubentry3" );
+        Attributes subentry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: subentry",
+            "objectClass: collectiveAttributeSubentry",
+            "c-st: FL",
+            "subtreeSpecification: { base \"ou=configuration\" }",
+            "cn: testsubentry3" );
+        
         return subentry;
     }
 
 
-    public void addAdministrativeRole( String role ) throws Exception
+    private void addAdministrativeRole( String role ) throws Exception
     {
         Attribute attribute = new BasicAttribute( "administrativeRole" );
         attribute.add( role );
@@ -128,7 +120,7 @@
     }
 
 
-    public Map<String, Attributes> getAllEntries() throws Exception
+    private Map<String, Attributes> getAllEntries() throws Exception
     {
         Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
@@ -146,25 +138,7 @@
     }
 
 
-    public SearchResult getEntry( String name ) throws Exception
-    {
-        SearchControls controls = new SearchControls();
-        controls.setSearchScope( SearchControls.SUBTREE_SCOPE );
-        controls.setReturningAttributes( new String[]
-            { "+", "*" } );
-        
-        NamingEnumeration<SearchResult> results = getSystemContext( service ).search(
name, "(objectClass=*)", controls );
-        
-        if ( results.hasMore() )
-        {
-            return results.next();
-        }
-        
-        return null;
-    }
-
-
-    public Map<String, Attributes> getAllEntriesRestrictAttributes() throws Exception
+    private Map<String, Attributes> getAllEntriesRestrictAttributes() throws Exception
     {
         Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
@@ -181,7 +155,7 @@
     }
     
     
-    public Map<String, Attributes> getAllEntriesCollectiveAttributesOnly() throws Exception
+    private Map<String, Attributes> getAllEntriesCollectiveAttributesOnly() throws
Exception
     {
         Map<String, Attributes> resultMap = new HashMap<String, Attributes>();
         SearchControls controls = new SearchControls();
@@ -465,10 +439,11 @@
     
     
     @Test
-    public void testAddRegularEntryWithCollectiveAttribute()
+    public void testAddRegularEntryWithCollectiveAttribute() throws NamingException
     {
         Attributes entry = getTestEntry( "Ersin Er" );
         entry.put( "c-l", "Turkiye" );
+        
         try
         {
             getSystemContext( service ).createSubcontext( "cn=Ersin Er", entry );

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/event/EventServiceIT.java
Mon Dec 28 23:10:54 2009
@@ -20,18 +20,15 @@
 package org.apache.directory.server.core.event;
 
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
 import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import static org.junit.Assert.assertEquals;
-import org.junit.Test;
-import org.junit.runner.RunWith;
+
+import java.util.ArrayList;
+import java.util.EventObject;
+import java.util.List;
 
 import javax.naming.NamingException;
-import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.SearchControls;
 import javax.naming.event.EventDirContext;
 import javax.naming.event.NamespaceChangeListener;
@@ -39,9 +36,11 @@
 import javax.naming.event.NamingExceptionEvent;
 import javax.naming.event.ObjectChangeListener;
 
-import java.util.ArrayList;
-import java.util.EventObject;
-import java.util.List;
+import org.apache.directory.server.core.integ.AbstractTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 
 /**
@@ -50,12 +49,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class EventServiceIT
+@RunWith ( FrameworkRunner.class )
+public class EventServiceIT extends AbstractTestUnit
 {
-    public static DirectoryService service;
-
-
     /**
      * Test to make sure NamingListener's are no longer registered
      * after they are removed via the EventContex.removeNamingListener method.
@@ -68,10 +64,12 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) getSystemContext( service ).lookup( ""
);
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
-        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
-        objectClass.add( "organizationalUnit" );
-        testEntry.put( objectClass );
+
+        Attributes testEntry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: organizationalUnit",
+            "ou", "testentry" );
+
         ctx.createSubcontext( "ou=testentry", testEntry );
 
         //  Wait 1 second, as the process is asynchronous
@@ -118,10 +116,12 @@
         TestListener listener = new TestListener();
         EventDirContext ctx = ( EventDirContext ) getSystemContext( service ).lookup( ""
);
         ctx.addNamingListener( "", SearchControls.SUBTREE_SCOPE, listener );
-        Attributes testEntry = new BasicAttributes( "ou", "testentry", true );
-        Attribute objectClass = new BasicAttribute( "objectClass", "top" );
-        objectClass.add( "organizationalUnit" );
-        testEntry.put( objectClass );
+
+        Attributes testEntry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: organizationalUnit",
+            "ou", "testentry" );
+
         ctx.createSubcontext( "ou=testentry", testEntry );
 
         //  Wait 1 second, as the process is asynchronous

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/exception/ExceptionServiceIT.java
Mon Dec 28 23:10:54 2009
@@ -39,14 +39,15 @@
 import javax.naming.directory.SearchResult;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.server.core.integ.AbstractTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.constants.SchemaConstants;
 import org.apache.directory.shared.ldap.exception.LdapContextNotEmptyException;
 import org.apache.directory.shared.ldap.exception.LdapNameAlreadyBoundException;
 import org.apache.directory.shared.ldap.exception.LdapNameNotFoundException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
 import org.apache.directory.shared.ldap.message.ResultCodeEnum;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -57,12 +58,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith ( CiRunner.class )
-public class ExceptionServiceIT
+@RunWith ( FrameworkRunner.class )
+public class ExceptionServiceIT extends AbstractTestUnit
 {
-    public static DirectoryService service;
-
-
     private DirContext createSubContext( String type, String value ) throws Exception
     {
         return createSubContext( getSystemContext( service ), type, value );
@@ -71,17 +69,14 @@
 
     private DirContext createSubContext( DirContext ctx, String type, String value ) throws
NamingException
     {
-        Attributes attrs = new BasicAttributes( type, value, true );
-        Attribute attr = new BasicAttribute( "ObjectClass" );
-        attr.add( "top"  );
-        attr.add( "person" );
-        attr.add( "OrganizationalPerson" );
-        attrs.put( attr );
-
-        attrs.put( "sn", value );
-        attrs.put( "cn", value );
+        Attributes subentry = AttributeUtils.createAttributes( 
+            "objectClass: top",
+            "objectClass: person",
+            "objectClass: OrganizationalPerson",
+            "sn", value,
+            "cn", value );
 
-        return ctx.createSubcontext( type + "=" + value, attrs );
+        return ctx.createSubcontext( type + "=" + value, subentry );
     }
 
 

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/jndi/AddIT.java
Mon Dec 28 23:10:54 2009
@@ -28,15 +28,14 @@
 
 import javax.naming.directory.Attribute;
 import javax.naming.directory.Attributes;
-import javax.naming.directory.BasicAttribute;
-import javax.naming.directory.BasicAttributes;
 import javax.naming.directory.DirContext;
 import javax.naming.ldap.LdapContext;
 
-import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.integ.CiRunner;
+import org.apache.directory.server.core.integ.AbstractTestUnit;
+import org.apache.directory.server.core.integ.FrameworkRunner;
 import org.apache.directory.shared.ldap.exception.LdapInvalidAttributeValueException;
 import org.apache.directory.shared.ldap.exception.LdapSchemaViolationException;
+import org.apache.directory.shared.ldap.util.AttributeUtils;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
@@ -47,12 +46,9 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-@RunWith(CiRunner.class)
-public class AddIT
+@RunWith(FrameworkRunner.class)
+public class AddIT extends AbstractTestUnit
 {
-    public static DirectoryService service;
-
-
     //    /**
     //     * Test that attribute name case is preserved after adding an entry
     //     * in the case the user added them.  This is to test DIRSERVER-832.
@@ -110,13 +106,10 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new BasicAttributes( true );
-        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
-        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
-        Attribute dc = new BasicAttribute( "dc", "ke" );
-        attrs.put( oc );
-        attrs.put( cn );
-        attrs.put( dc );
+        Attributes attrs = AttributeUtils.createAttributes( 
+            "ObjectClass: top",
+            "cn: kevin Spacey",
+            "dc: ke" );
 
         String base = "uid=kevin";
 
@@ -143,20 +136,16 @@
     {
         LdapContext sysRoot = getSystemContext( service );
 
-        Attributes attrs = new BasicAttributes( true );
-        Attribute oc = new BasicAttribute( "ObjectClass", "top" );
-        oc.add( "person" );
-        Attribute cn = new BasicAttribute( "cn", "kevin Spacey" );
-        Attribute sn = new BasicAttribute( "sn", "ke" );
-        Attribute telephone = new BasicAttribute( "telephoneNumber", "0123456abc" );
-        attrs.put( oc );
-        attrs.put( cn );
-        attrs.put( sn );
-        attrs.put( telephone );
+        Attributes attrs = AttributeUtils.createAttributes( 
+            "ObjectClass: top",
+            "ObjectClass: person",
+            "cn: kevin Spacey",
+            "sn: ke",
+            "telephoneNumber: 0123456abc");
 
         String base = "sn=kevin";
 
-        //create subcontext
+        // create subcontext
         try
         {
             sysRoot.createSubcontext( base, attrs );
@@ -175,14 +164,14 @@
     @Test
     public void testAddAttributeWithEscapedPlusCharacter() throws Exception
     {
-        Attributes attributes = new BasicAttributes( false );
-        attributes.put( "objectClass", "top" );
-        attributes.put( "objectClass", "inetorgperson" );
-        attributes.put( "cn", "John\\+Doe" );
-        attributes.put( "sn", "\\+Name\\+" );
+        Attributes entry = AttributeUtils.createAttributes( 
+            "ObjectClass: top",
+            "ObjectClass: inetorgperson",
+            "cn: John\\+Doe",
+            "sn: \\+Name\\+" );
         
         LdapContext sysRoot = getSystemContext( service );
-        DirContext dc = sysRoot.createSubcontext( "cn=John\\+Doe", attributes );
+        DirContext dc = sysRoot.createSubcontext( "cn=John\\+Doe", entry );
         
         ServerLdapContext sc = ( ServerLdapContext ) dc;
         

Modified: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
(original)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite.java
Mon Dec 28 23:10:54 2009
@@ -19,12 +19,8 @@
 package org.apache.directory.server.core.suites;
 
 
-import org.apache.directory.server.core.authn.SimpleAuthenticationIT;
 import org.apache.directory.server.core.changelog.DefaultChangeLogIT;
-import org.apache.directory.server.core.collective.CollectiveAttributeServiceIT;
 import org.apache.directory.server.core.configuration.PartitionConfigurationIT;
-import org.apache.directory.server.core.event.EventServiceIT;
-import org.apache.directory.server.core.exception.ExceptionServiceIT;
 import org.apache.directory.server.core.integ.CiSuite;
 import org.apache.directory.server.core.integ.Level;
 import org.apache.directory.server.core.integ.SetupMode;
@@ -67,10 +63,10 @@
  */
 @RunWith ( CiSuite.class )
 @Suite.SuiteClasses ( {
-        SimpleAuthenticationIT.class,
-        CollectiveAttributeServiceIT.class,
-        ExceptionServiceIT.class,
-        EventServiceIT.class,
+        //SimpleAuthenticationIT.class,
+        //CollectiveAttributeServiceIT.class,
+        //ExceptionServiceIT.class,
+        //EventServiceIT.class,
         AddIT.class,
         CreateContextIT.class,
         DestroyContextIT.class,

Added: directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite2.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite2.java?rev=894270&view=auto
==============================================================================
--- directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite2.java
(added)
+++ directory/apacheds/branches/apacheds-schema/core-integ/src/test/java/org/apache/directory/server/core/suites/StockCoreISuite2.java
Mon Dec 28 23:10:54 2009
@@ -0,0 +1,74 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *  http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.directory.server.core.suites;
+
+
+import org.apache.directory.server.core.authn.SimpleAuthenticationIT;
+import org.apache.directory.server.core.collective.CollectiveAttributeServiceIT;
+import org.apache.directory.server.core.event.EventServiceIT;
+import org.apache.directory.server.core.exception.ExceptionServiceIT;
+import org.apache.directory.server.core.integ.FrameworkSuite;
+import org.apache.directory.server.core.jndi.AddIT;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+
+
+/**
+ * Document me!
+ *
+ * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
+ * @version $Rev$, $Date$
+ */
+@RunWith ( FrameworkSuite.class )
+@Suite.SuiteClasses ( {
+        SimpleAuthenticationIT.class,
+        CollectiveAttributeServiceIT.class,
+        ExceptionServiceIT.class,
+        EventServiceIT.class,
+        AddIT.class/*,
+        CreateContextIT.class,
+        DestroyContextIT.class,
+        PartitionConfigurationIT.class,
+        DIRSERVER169IT.class,
+        DIRSERVER759IT.class,
+        DIRSERVER783IT.class,
+        DIRSERVER791IT.class,
+        ListIT.class,
+        ObjStateFactoryIT.class,
+        ExtensibleObjectIT.class,
+        ModifyContextIT.class,
+        RFC2713IT.class,
+        RootDSEIT.class,
+        SearchIT.class,
+        UniqueMemberIT.class,
+        OperationalAttributeServiceIT.class,
+        PreferencesIT.class,
+        TriggerInterceptorIT.class,
+        SubentryServiceForTriggersIT.class,
+        BadSubentryServiceIT.class,
+        SubentryServiceEntryModificationHandlingIT.class,
+        SubentryServiceObjectClassChangeHandlingIT.class,
+        SubentryServiceIT.class,
+        LdapClassLoaderIT.class,
+        NormalizationServiceIT.class,
+        DefaultChangeLogIT.class*/
+        } )
+public class StockCoreISuite2
+{
+}

Modified: directory/apacheds/branches/apacheds-schema/test-framework/pom.xml
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/apacheds-schema/test-framework/pom.xml?rev=894270&r1=894269&r2=894270&view=diff
==============================================================================
--- directory/apacheds/branches/apacheds-schema/test-framework/pom.xml (original)
+++ directory/apacheds/branches/apacheds-schema/test-framework/pom.xml Mon Dec 28 23:10:54
2009
@@ -6,12 +6,14 @@
     <artifactId>apacheds-parent</artifactId>
     <version>1.5.6-SNAPSHOT</version>
   </parent>
-  <groupId>org.apache.directory.server.core.integ</groupId>
   <artifactId>apacheds-test-framework</artifactId>
+  <name>ApacheDS test framework</name>
   <packaging>jar</packaging>
-  <version>1.5.6-SNAPSHOT</version>
-  <name>apacheds-test-framework</name>
-  <description>test framework for integration tests without depending on the InheritableSettings</description>
+  
+  <description>
+    test framework for integration tests without depending on the InheritableSettings
+  </description>
+  
   <dependencies>
     <dependency>
       <groupId>junit</groupId>



Mime
View raw message