Skip to Content.
Sympa Menu

notify-dpml - svn commit: r2710 - development/main/transit/core/handler/src/test/net/dpml/transit/manager

notify-dpml AT lists.ibiblio.org

Subject: DPML Notify

List archive

Chronological Thread  
  • From: mcconnell AT dpml.net
  • To: notify-dpml AT lists.ibiblio.org
  • Subject: svn commit: r2710 - development/main/transit/core/handler/src/test/net/dpml/transit/manager
  • Date: Sun, 05 Jun 2005 12:12:24 -0400

Author: mcconnell AT dpml.net
Date: Sun Jun 5 12:12:23 2005
New Revision: 2710

Modified:

development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
Log:
Extended testing of the proxy manager.

Modified:
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
==============================================================================
---
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
(original)
+++
development/main/transit/core/handler/src/test/net/dpml/transit/manager/ProxyManagerTestCase.java
Sun Jun 5 12:12:23 2005
@@ -24,6 +24,7 @@
import java.net.PasswordAuthentication;
import java.util.Date;
import java.util.prefs.Preferences;
+import java.net.URL;

import junit.framework.TestCase;

@@ -33,6 +34,8 @@
import net.dpml.transit.model.ProxyListener;
import net.dpml.transit.model.Logger;

+import net.dpml.transit.manager.DefaultProxyManager;
+import net.dpml.transit.management.ProxyManager;
import net.dpml.transit.management.TransitManager;
import net.dpml.transit.builder.TransitHelper;

@@ -58,6 +61,22 @@
{
String username = "peter";
String password = "rabbit";
+ Logger logger = m_manager.getLogger().getChildLogger( "proxy-test" );
+ PasswordAuthentication auth =
+ new PasswordAuthentication( username, password.toCharArray() );
+ URL host = new URL( "http://localhost"; );
+ String[] excludes = new String[]{ "http://abc";, "http://xyz"; };
+ ProxyManager manager = new DefaultProxyManager( logger, host, auth,
excludes );
+ assertEquals( "host", host, manager.getHost() );
+ assertEquals( "auth", auth, manager.getAuthentication() );
+ assertEquals( "logger", logger, manager.getLogger() );
+ assertEquals( "excludes", excludes.length,
manager.getExcludes().length );
+ }
+
+ public void testProxyAuthenticationListener() throws Exception
+ {
+ String username = "peter";
+ String password = "rabbit";
PasswordAuthentication auth =
new PasswordAuthentication( username, password.toCharArray() );

@@ -92,7 +111,6 @@
{
m_auth = auth;
}
-
public void proxyChanged( ProxyEvent event )
{
event.getProxyModel().removeProxyListener( this );



  • svn commit: r2710 - development/main/transit/core/handler/src/test/net/dpml/transit/manager, mcconnell, 06/05/2005

Archive powered by MHonArc 2.6.24.

Top of Page