Author: bago
Date: Wed Jul 30 12:07:28 2008
New Revision: 681178

URL: http://svn.apache.org/viewvc?rev=681178&view=rev
Log:
Moved RemoteManagerTestConfiguration creator to that class (it was in a shared 
Util class).
Removed unused SMTP chain creators from test's Util.java

Modified:
    
james/server/trunk/phoenix-deployment/src/test/org/apache/james/remotemanager/RemoteManagerTestConfiguration.java
    
james/server/trunk/phoenix-deployment/src/test/org/apache/james/test/util/Util.java

Modified: 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/remotemanager/RemoteManagerTestConfiguration.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/src/test/org/apache/james/remotemanager/RemoteManagerTestConfiguration.java?rev=681178&r1=681177&r2=681178&view=diff
==============================================================================
--- 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/remotemanager/RemoteManagerTestConfiguration.java
 (original)
+++ 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/remotemanager/RemoteManagerTestConfiguration.java
 Wed Jul 30 12:07:28 2008
@@ -95,7 +95,7 @@
         
         // handlerConfig.addChild(Util.getValuedConfiguration("prompt", ">"));
 
-        
handlerConfig.addChild(Util.createRemoteManagerHandlerChainConfiguration());
+        handlerConfig.addChild(createRemoteManagerHandlerChainConfiguration());
         addChild(handlerConfig);
         
         DefaultConfiguration commandConfiguration = new 
DefaultConfiguration("command");
@@ -104,4 +104,10 @@
         addChild(commandConfiguration);
     }
 
+    public static DefaultConfiguration 
createRemoteManagerHandlerChainConfiguration() {
+        DefaultConfiguration handlerChainConfig = new 
DefaultConfiguration("test");
+        return handlerChainConfig;
+    }
+
+
 }

Modified: 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/test/util/Util.java
URL: 
http://svn.apache.org/viewvc/james/server/trunk/phoenix-deployment/src/test/org/apache/james/test/util/Util.java?rev=681178&r1=681177&r2=681178&view=diff
==============================================================================
--- 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/test/util/Util.java
 (original)
+++ 
james/server/trunk/phoenix-deployment/src/test/org/apache/james/test/util/Util.java
 Wed Jul 30 12:07:28 2008
@@ -22,18 +22,6 @@
 import 
org.apache.avalon.cornerstone.blocks.datasources.DefaultDataSourceSelector;
 import org.apache.avalon.framework.configuration.Configuration;
 import org.apache.avalon.framework.configuration.DefaultConfiguration;
-import org.apache.james.smtpserver.core.AuthCmdHandler;
-import org.apache.james.smtpserver.core.DataCmdHandler;
-import org.apache.james.smtpserver.core.EhloCmdHandler;
-import org.apache.james.smtpserver.core.ExpnCmdHandler;
-import org.apache.james.smtpserver.core.HeloCmdHandler;
-import org.apache.james.smtpserver.core.HelpCmdHandler;
-import org.apache.james.smtpserver.core.MailCmdHandler;
-import org.apache.james.smtpserver.core.QuitCmdHandler;
-import org.apache.james.smtpserver.core.RcptCmdHandler;
-import org.apache.james.smtpserver.core.RsetCmdHandler;
-import org.apache.james.smtpserver.core.SendMailHandler;
-import org.apache.james.smtpserver.core.VrfyCmdHandler;
 import org.apache.james.test.mock.avalon.MockLogger;
 import org.apache.james.test.mock.util.AttrValConfiguration;
 
@@ -99,38 +87,6 @@
         return defaultConfiguration;
     }
 
-    public static DefaultConfiguration 
createRemoteManagerHandlerChainConfiguration() {
-        DefaultConfiguration handlerChainConfig = new 
DefaultConfiguration("test");
-        return handlerChainConfig;
-    }
-    public static DefaultConfiguration createSMTPHandlerChainConfiguration() {
-        DefaultConfiguration handlerChainConfig = new 
DefaultConfiguration("handlerchain");
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("HELO", 
HeloCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("EHLO", 
EhloCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("AUTH", 
AuthCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("VRFY", 
VrfyCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("EXPN", 
ExpnCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("MAIL", 
MailCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("RCPT", 
RcptCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("DATA", 
DataCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("RSET", 
RsetCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("HELP", 
HelpCmdHandler.class));
-        handlerChainConfig.addChild(createCommandHandlerConfiguration("QUIT", 
QuitCmdHandler.class));
-        // mail sender
-        handlerChainConfig.addChild(createCommandHandlerConfiguration(null, 
SendMailHandler.class));
-        return handlerChainConfig;
-    }
-
-    private static DefaultConfiguration 
createCommandHandlerConfiguration(String command, Class commandClass) {
-        DefaultConfiguration cmdHandlerConfig = new 
DefaultConfiguration("handler");
-        if (command != null) {
-            cmdHandlerConfig.setAttribute("command", command);
-        }
-        String classname = commandClass.getName();
-        cmdHandlerConfig.setAttribute("class", classname);
-        return cmdHandlerConfig;
-    }
-
     /**
      * @return
      * @throws Exception



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to