Author: trustin
Date: Tue Mar  8 20:49:00 2005
New Revision: 156617

URL: http://svn.apache.org/viewcvs?view=rev&rev=156617
Log:
* Revived passthru test.
* Renamed FrontendPassthruTest into ServiceRegistryPassthruTest


Added:
    
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/ServiceRegistryPassthruTest.java
      - copied, changed from r156513, 
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/FrontendPassthruTest.java
Removed:
    
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/FrontendPassthruTest.java

Copied: 
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/ServiceRegistryPassthruTest.java
 (from r156513, 
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/FrontendPassthruTest.java)
URL: 
http://svn.apache.org/viewcvs/incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/ServiceRegistryPassthruTest.java?view=diff&rev=156617&p1=incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/FrontendPassthruTest.java&r1=156513&p2=incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/ServiceRegistryPassthruTest.java&r2=156617
==============================================================================
--- 
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/FrontendPassthruTest.java
 (original)
+++ 
incubator/directory/apacheds/trunk/core/src/test/org/apache/ldap/server/jndi/ServiceRegistryPassthruTest.java
 Tue Mar  8 20:49:00 2005
@@ -18,6 +18,8 @@
 
 
 import org.apache.ldap.server.AbstractServerTest;
+import org.apache.mina.registry.ServiceRegistry;
+import org.apache.mina.registry.SimpleServiceRegistry;
 
 
 /**
@@ -26,40 +28,40 @@
  * @author <a href="mailto:[EMAIL PROTECTED]">Apache Directory Project</a>
  * @version $Rev$
  */
-public class FrontendPassthruTest extends AbstractServerTest
+public class ServiceRegistryPassthruTest extends AbstractServerTest
 {
-//    DefaultFrontend fe;
+    private ServiceRegistry registry;
 
 
     protected void setUp() throws Exception
     {
-//        if ( getName().equals( "testUsePassthru" ) )
-//        {
-//            fe = ( DefaultFrontend ) new DefaultFrontendFactory().create();
-//            super.extras.put( EnvKeys.PASSTHRU, fe );
-//        }
-//
-//        super.setUp();
+        if ( getName().equals( "testUsePassthru" ) )
+        {
+            registry = new SimpleServiceRegistry();
+            super.extras.put( EnvKeys.PASSTHRU, registry );
+        }
+
+        super.setUp();
     }
 
 
     protected void tearDown() throws Exception
     {
-//        super.tearDown();
-//        fe = null;
+        super.tearDown();
+        registry = null;
     }
 
 
     public void testUsePassthru() throws Exception
     {
-//        assertTrue( sysRoot.getEnvironment().containsKey( EnvKeys.PASSTHRU ) 
);
-//        assertEquals( String.class, sysRoot.getEnvironment().get( 
EnvKeys.PASSTHRU ).getClass() );
-//        assertEquals( "Handoff Succeeded!", sysRoot.getEnvironment().get( 
EnvKeys.PASSTHRU ) );
+        assertTrue( sysRoot.getEnvironment().containsKey( EnvKeys.PASSTHRU ) );
+        assertEquals( String.class, sysRoot.getEnvironment().get( 
EnvKeys.PASSTHRU ).getClass() );
+        assertEquals( "Handoff Succeeded!", sysRoot.getEnvironment().get( 
EnvKeys.PASSTHRU ) );
     }
 
 
     public void testDoNotUsePassthru() throws Exception
     {
-//        assertFalse( sysRoot.getEnvironment().containsKey( EnvKeys.PASSTHRU 
) );
+        assertFalse( sysRoot.getEnvironment().containsKey( EnvKeys.PASSTHRU ) 
);
     }
 }


Reply via email to