james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From e...@apache.org
Subject svn commit: r1228125 - in /james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver: SMTPServerTest.java SPFHandlerTest.java ValidRcptHandlerTest.java ValidRcptMXTest.java
Date Fri, 06 Jan 2012 11:37:10 GMT
Author: eric
Date: Fri Jan  6 11:37:10 2012
New Revision: 1228125

URL: http://svn.apache.org/viewvc?rev=1228125&view=rev
Log:
Import and Class rename / usage to use the new protocols 1.6.0-RC2-SNAPSHOT (JAMES-1360)

Modified:
    james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
    james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
    james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java
    james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java

Modified: james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java?rev=1228125&r1=1228124&r2=1228125&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
(original)
+++ james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SMTPServerTest.java
Fri Jan  6 11:37:10 2012
@@ -41,18 +41,18 @@ import junit.framework.TestCase;
 
 import org.apache.commons.net.smtp.SMTPClient;
 import org.apache.commons.net.smtp.SMTPReply;
-import org.apache.james.protocols.netty.AbstractChannelPipelineFactory;
+import org.apache.james.dnsservice.api.DNSService;
+import org.apache.james.domainlist.api.mock.SimpleDomainList;
+import org.apache.james.filesystem.api.mock.MockFileSystem;
+import org.apache.james.mailrepository.mock.MockMailRepositoryStore;
 import org.apache.james.protocols.lib.PortUtil;
 import org.apache.james.protocols.lib.mock.MockProtocolHandlerLoader;
+import org.apache.james.protocols.netty.AbstractChannelPipelineFactory;
 import org.apache.james.queue.api.mock.MockMailQueue;
 import org.apache.james.queue.api.mock.MockMailQueueFactory;
 import org.apache.james.rrt.api.RecipientRewriteTable;
 import org.apache.james.rrt.api.RecipientRewriteTableException;
 import org.apache.james.smtpserver.netty.SMTPServer;
-import org.apache.james.dnsservice.api.DNSService;
-import org.apache.james.domainlist.api.mock.SimpleDomainList;
-import org.apache.james.filesystem.api.mock.MockFileSystem;
-import org.apache.james.mailrepository.mock.MockMailRepositoryStore;
 import org.apache.james.user.lib.mock.MockUsersRepository;
 import org.apache.mailet.HostAddress;
 import org.apache.mailet.Mail;
@@ -147,7 +147,7 @@ public class SMTPServerTest extends Test
     protected AlterableDNSServer m_dnsServer;
     protected MockMailRepositoryStore store;
     protected MockFileSystem fileSystem;
-    protected SMTPServerDNSServiceAdapter dnsAdapter;
+    protected DNSService dnsService;
     protected MockProtocolHandlerLoader chain;
     protected MockMailQueueFactory queueFactory;
     protected MockMailQueue queue;
@@ -294,7 +294,7 @@ public class SMTPServerTest extends Test
         fileSystem = new MockFileSystem();
 
         chain.put("filesystem", fileSystem);
-        chain.put("org.apache.james.smtpserver.protocol.DNSService", dnsAdapter);
+        chain.put("org.apache.james.smtpserver.protocol.DNSService", dnsService);
         chain.put("recipientrewritetable", new RecipientRewriteTable() {
 
             public void addRegexMapping(String user, String domain, String regex) throws
RecipientRewriteTableException {
@@ -359,7 +359,7 @@ public class SMTPServerTest extends Test
             }
         });
 
-        chain.put("org.apache.james.smtpserver.protocol.DNSService", dnsAdapter);
+        chain.put("org.apache.james.smtpserver.protocol.DNSService", dnsService);
         queueFactory = new MockMailQueueFactory();
         queue = (MockMailQueue) queueFactory.getQueue(MockMailQueueFactory.SPOOL);
         chain.put("mailqueuefactory", queueFactory);

Modified: james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java?rev=1228125&r1=1228124&r2=1228125&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
(original)
+++ james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/SPFHandlerTest.java
Fri Jan  6 11:37:10 2012
@@ -24,18 +24,18 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import junit.framework.TestCase;
+
 import org.apache.james.jspf.core.DNSRequest;
 import org.apache.james.jspf.core.DNSService;
 import org.apache.james.jspf.core.exceptions.TimeoutException;
 import org.apache.james.protocols.smtp.BaseFakeSMTPSession;
+import org.apache.james.protocols.smtp.MailAddress;
 import org.apache.james.protocols.smtp.SMTPSession;
 import org.apache.james.protocols.smtp.hook.HookReturnCode;
 import org.apache.james.smtpserver.fastfail.SPFHandler;
-import org.apache.mailet.base.test.FakeMail;
 import org.apache.mailet.Mail;
-import org.apache.mailet.MailAddress;
-
-import junit.framework.TestCase;
+import org.apache.mailet.base.test.FakeMail;
 
 public class SPFHandlerTest extends TestCase {
 

Modified: james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java?rev=1228125&r1=1228124&r2=1228125&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java
(original)
+++ james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptHandlerTest.java
Fri Jan  6 11:37:10 2012
@@ -28,6 +28,7 @@ import junit.framework.TestCase;
 
 import org.apache.james.domainlist.api.mock.SimpleDomainList;
 import org.apache.james.protocols.smtp.BaseFakeSMTPSession;
+import org.apache.james.protocols.smtp.MailAddress;
 import org.apache.james.protocols.smtp.SMTPConfiguration;
 import org.apache.james.protocols.smtp.SMTPSession;
 import org.apache.james.protocols.smtp.hook.HookReturnCode;
@@ -36,7 +37,6 @@ import org.apache.james.rrt.api.Recipien
 import org.apache.james.smtpserver.fastfail.ValidRcptHandler;
 import org.apache.james.user.api.UsersRepository;
 import org.apache.james.user.lib.mock.MockUsersRepository;
-import org.apache.mailet.MailAddress;
 
 public class ValidRcptHandlerTest extends TestCase {
 
@@ -193,6 +193,18 @@ public class ValidRcptHandlerTest extend
             public boolean isStartTLSSupported() {
                 return false;
             }
+
+            @Override
+            public String getGreeting() {
+                // TODO Auto-generated method stub
+                return null;
+            }
+
+            @Override
+            public String getSoftwareName() {
+                // TODO Auto-generated method stub
+                return null;
+            }
         };
 
         return conf;

Modified: james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
URL: http://svn.apache.org/viewvc/james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java?rev=1228125&r1=1228124&r2=1228125&view=diff
==============================================================================
--- james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
(original)
+++ james/server/trunk/smtpserver/src/test/java/org/apache/james/smtpserver/ValidRcptMXTest.java
Fri Jan  6 11:37:10 2012
@@ -28,15 +28,16 @@ import java.util.Map;
 
 import javax.mail.internet.ParseException;
 
+import junit.framework.TestCase;
+
 import org.apache.james.dnsservice.api.DNSService;
 import org.apache.james.dnsservice.api.mock.MockDNSService;
 import org.apache.james.protocols.smtp.BaseFakeSMTPSession;
+import org.apache.james.protocols.smtp.MailAddress;
+import org.apache.james.protocols.smtp.MailAddressException;
 import org.apache.james.protocols.smtp.SMTPSession;
 import org.apache.james.protocols.smtp.hook.HookReturnCode;
 import org.apache.james.smtpserver.fastfail.ValidRcptMX;
-import org.apache.mailet.MailAddress;
-
-import junit.framework.TestCase;
 
 public class ValidRcptMXTest extends TestCase {
 
@@ -88,7 +89,7 @@ public class ValidRcptMXTest extends Tes
         return dns;
     }
 
-    public void testRejectLoopbackMX() throws ParseException {
+    public void testRejectLoopbackMX() throws ParseException, MailAddressException {
         Collection bNetworks = new ArrayList();
         bNetworks.add("127.0.0.1");
 



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message