directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r600826 - in /directory/apacheds/branches/bigbang: core-integ/src/test/java/org/apache/directory/server/core/ core-integ/src/test/java/org/apache/directory/server/core/jndi/ core-unit/src/test/java/org/apache/directory/server/core/jndi/
Date Tue, 04 Dec 2007 07:58:56 GMT
Author: akarasulu
Date: Mon Dec  3 23:58:55 2007
New Revision: 600826

URL: http://svn.apache.org/viewvc?rev=600826&view=rev
Log:
converted a few other itests to new framework

Added:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
      - copied, changed from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
      - copied, changed from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java
      - copied, changed from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
Removed:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
Modified:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java?rev=600826&r1=600825&r2=600826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.java
Mon Dec  3 23:58:55 2007
@@ -50,6 +50,9 @@
         DestroyContextIT.class,
         DIRSERVER169IT.class,
         DIRSERVER759IT.class,
+        DIRSERVER783IT.class,
+        DIRSERVER791IT.class,
+        ExtensibleObjectIT.class,
         PartitionConfigurationIT.class  // Leaves the server in a bad state (partition removal
is incomplete)
         } )
 @Scope ( ServiceScope.TESTSUITE )

Modified: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java?rev=600826&r1=600825&r2=600826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER759IT.java
Mon Dec  3 23:58:55 2007
@@ -163,6 +163,7 @@
     @Test
     public void testSearchBadDN() throws NamingException
     {
+        createData();
         LdapContext sysRoot = getSystemContext( service );
 
         SearchControls controls = new SearchControls();

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
(from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java&r1=600818&r2=600826&rev=600826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783ITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER783IT.java
Mon Dec  3 23:58:55 2007
@@ -19,11 +19,17 @@
  */
 package org.apache.directory.server.core.jndi;
 
+
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.server.core.integ.CiRunner;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
+import org.junit.runner.RunWith;
 
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
@@ -37,13 +43,10 @@
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-
-public class DIRSERVER783ITest extends AbstractAdminTestCase
+@RunWith ( CiRunner.class )
+public class DIRSERVER783IT
 {
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
-    }
+    public static DirectoryService service;
 
 
     /**
@@ -51,6 +54,7 @@
      * 
      * @throws NamingException if there are errors
      */
+    @Test
     public void testAddAnotherValueToAnAttribute() throws NamingException
     {
         // create a person without sn

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
(from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java&r1=600818&r2=600826&rev=600826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791ITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER791IT.java
Mon Dec  3 23:58:55 2007
@@ -19,30 +19,43 @@
  */
 package org.apache.directory.server.core.jndi;
 
+
 import org.apache.directory.server.core.DirectoryService;
-import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+import org.apache.directory.server.core.integ.CiRunner;
+import static org.apache.directory.server.core.integ.IntegrationUtils.getSystemContext;
 import org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
 import org.apache.directory.shared.ldap.message.ModificationItemImpl;
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.fail;
+import org.junit.runner.RunWith;
 
 import javax.naming.Context;
 import javax.naming.NamingException;
 import javax.naming.directory.*;
 import java.util.Hashtable;
 
+
 /**
  * A test case which demonstrates the three defects described in DIRSERVER-791.
  * 
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  */
-public class DIRSERVER791ITest extends AbstractAdminTestCase
+@RunWith ( CiRunner.class )
+public class DIRSERVER791IT
 {
+    public static DirectoryService service;
+
+
     /**
      * Returns the attributes as depicted as test data in DIRSERVER-791
      * @return attributes for the test entry
      */
-    protected Attributes getTestEntryAttributes() {
-
+    protected Attributes getTestEntryAttributes()
+    {
         Attributes attrs = new AttributesImpl();
         Attribute ocls = new AttributeImpl("objectClass");
         ocls.add("top");
@@ -61,12 +74,16 @@
         return attrs;
     }
 
-    protected void setUp() throws Exception 
-    {
-        super.setUp();
 
+    /**
+     * @todo  replace this with an ldif annotation
+     *
+     * @throws NamingException on error
+     */
+    protected void createData() throws NamingException
+    {
         Attributes entry = this.getTestEntryAttributes();
-        sysRoot.createSubcontext("cn=test", entry);
+        getSystemContext( service ).createSubcontext("cn=test", entry);
     }
 
     
@@ -76,9 +93,10 @@
      *
      * @throws NamingException on error
      */
+    @Test
     public void testDefect1a() throws NamingException 
     {
-
+        createData();
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
@@ -104,8 +122,10 @@
      *
      * @throws NamingException on error
      */
-    public void testDefect1b() throws NamingException 
+    @Test
+    public void testDefect1b() throws NamingException
     {
+        createData();
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
@@ -133,8 +153,10 @@
      *
      * @throws NamingException on error
      */
-    public void testDefect2() throws NamingException 
+    @Test
+    public void testDefect2() throws NamingException
     {
+        createData();
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
@@ -182,8 +204,10 @@
      *
      * @throws NamingException on error
      */
-    public void testDefect3() throws NamingException 
+    @Test
+    public void testDefect3() throws NamingException
     {
+        createData();
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java
(from r600818, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java&r1=600818&r2=600826&rev=600826&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/ExtensibleObjectIT.java
Mon Dec  3 23:58:55 2007
@@ -20,14 +20,18 @@
 package org.apache.directory.server.core.jndi;
 
 
-import javax.naming.directory.Attribute;
-import javax.naming.directory.Attributes;
-import javax.naming.directory.DirContext;
-
-import org.apache.directory.server.core.unit.AbstractAdminTestCase;
+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 org.apache.directory.shared.ldap.message.AttributeImpl;
 import org.apache.directory.shared.ldap.message.AttributesImpl;
+import org.junit.Test;import static org.junit.Assert.assertNotNull;import static org.junit.Assert.assertEquals;import
static org.junit.Assert.assertTrue;
+import org.junit.runner.RunWith;
 
+import javax.naming.directory.Attribute;
+import javax.naming.directory.Attributes;
+import javax.naming.directory.DirContext;
+import javax.naming.ldap.LdapContext;
 
 
 /**
@@ -36,10 +40,16 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class ExtensibleObjectITest extends AbstractAdminTestCase
+@RunWith ( CiRunner.class )
+public class ExtensibleObjectIT
 {
+    public static DirectoryService service;
+
+
+    @Test
     public void testExtensibleObjectModify() throws Exception
     {
+        LdapContext sysRoot = getSystemContext( service );
         Attributes attributes = new AttributesImpl( true );
         Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
@@ -84,8 +94,10 @@
     }
 
 
+    @Test
     public void testExtensibleObjectAdd() throws Exception
     {
+        LdapContext sysRoot = getSystemContext( service );
         Attributes attributes = new AttributesImpl( true );
         Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );



Mime
View raw message