directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akaras...@apache.org
Subject svn commit: r600819 - 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:40:16 GMT
Author: akarasulu
Date: Mon Dec  3 23:40:14 2007
New Revision: 600819

URL: http://svn.apache.org/viewvc?rev=600819&view=rev
Log:
convert another itest to new framework

Added:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
      - copied, changed from r600772, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
Removed:
    directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
Modified:
    directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/StockCoreISuite.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=600819&r1=600818&r2=600819&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:40:14 2007
@@ -30,6 +30,7 @@
 import org.apache.directory.server.core.integ.annotations.Scope;
 import org.apache.directory.server.core.jndi.AddIT;
 import org.apache.directory.server.core.jndi.CreateContextIT;
+import org.apache.directory.server.core.jndi.DIRSERVER169IT;
 import org.apache.directory.server.core.jndi.DestroyContextIT;
 import org.junit.runner.RunWith;
 import org.junit.runners.Suite;
@@ -50,6 +51,7 @@
         AddIT.class,
         CreateContextIT.class,
         DestroyContextIT.class,
+        DIRSERVER169IT.class,
         PartitionConfigurationIT.class  // Leaves the server in a bad state (partition removal
is incomplete)
         } )
 @Scope ( ServiceScope.TESTSUITE )

Copied: directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
(from r600772, directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java)
URL: http://svn.apache.org/viewvc/directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java?p2=directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java&p1=directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java&r1=600772&r2=600819&rev=600819&view=diff
==============================================================================
--- directory/apacheds/branches/bigbang/core-unit/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169ITest.java
(original)
+++ directory/apacheds/branches/bigbang/core-integ/src/test/java/org/apache/directory/server/core/jndi/DIRSERVER169IT.java
Mon Dec  3 23:40:14 2007
@@ -21,13 +21,20 @@
 
 
 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 static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+import org.junit.Test;
+import org.junit.runner.RunWith;
 
 import javax.naming.Context;
 import javax.naming.NamingEnumeration;
+import javax.naming.NamingException;
 import javax.naming.directory.*;
+import javax.naming.ldap.LdapContext;
 import java.util.Hashtable;
 
 
@@ -37,11 +44,21 @@
  * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
  * @version $Rev$
  */
-public class DIRSERVER169ITest extends AbstractAdminTestCase
+@RunWith ( CiRunner.class )
+public class DIRSERVER169IT
 {
-    protected void setUp() throws Exception
+    public static DirectoryService service;
+
+
+    /**
+     * @todo replace this later with an Ldif tag
+     *
+     * @throws NamingException on error
+     */
+    protected void createData() throws NamingException
     {
-        super.setUp();
+        LdapContext sysRoot = getSystemContext( service );
+
         Attributes people = new AttributesImpl( true );
         Attribute attribute = new AttributeImpl( "objectClass" );
         attribute.add( "top" );
@@ -66,8 +83,14 @@
     }
 
 
+    @Test
     public void testSearchResultNameIsRelativeToSearchContext() throws Exception
     {
+        // @todo replace with ldif tags
+        createData();
+
+        LdapContext sysRoot = getSystemContext( service );
+
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );
@@ -107,8 +130,12 @@
      *
      * @throws Exception if there are errors
      */
+    @Test
     public void testPasswordComparisonSucceeds() throws Exception
     {
+        // @todo replace with ldif tags
+        createData();
+
         Hashtable<String,Object> env = new Hashtable<String,Object>();
         env.put( DirectoryService.JNDI_KEY, service );
         env.put( Context.INITIAL_CONTEXT_FACTORY, CoreContextFactory.class.getName() );



Mime
View raw message