You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by da...@apache.org on 2006/11/03 10:47:23 UTC
svn commit: r470739 - in
/james/server/sandbox/mailet-refactorings/src/test/org/apache/james:
test/mock/mailet/ transport/matchers/
Author: danny
Date: Fri Nov 3 01:47:22 2006
New Revision: 470739
URL: http://svn.apache.org/viewvc?view=rev&rev=470739
Log:
fixing tests after API changes
Modified:
james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMail.java
james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMailContext.java
james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java
james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractSenderIsTest.java
james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/HostIsLocalTest.java
Modified: james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMail.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMail.java?view=diff&rev=470739&r1=470738&r2=470739
==============================================================================
--- james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMail.java (original)
+++ james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMail.java Fri Nov 3 01:47:22 2006
@@ -51,6 +51,12 @@
private HashMap attributes = new HashMap();
+ private String hostAddress;
+
+ private String hostName;
+
+ private MailAddress reversePath;
+
private static final long serialVersionUID = 1L;
public String getName() {
@@ -141,6 +147,42 @@
public void setLastUpdated(Date lastUpdated) {
this.lastUpdated = lastUpdated;
+ }
+
+ /**
+ * @see org.apache.mailet.Mail#dispose()
+ */
+ public void dispose() {
+
+ // TODO Auto-generated method stub MUST contain a statement
+ // Blame: angusd
+
+ }
+
+ /**
+ * @see org.apache.mailet.Mail#setRemoteAddr(java.lang.String)
+ */
+ public void setRemoteAddr(String hostAddress) {
+
+ this.hostAddress = hostAddress;
+
+ }
+
+ /**
+ * @see org.apache.mailet.Mail#setRemoteHost(java.lang.String)
+ */
+ public void setRemoteHost(String hostName) {
+
+ this.hostName=hostName;
+ }
+
+ /**
+ * @see org.apache.mailet.Mail#setSender(org.apache.mailet.MailAddress)
+ */
+ public void setSender(MailAddress reversePath) {
+
+ this.reversePath = reversePath;
+
}
}
Modified: james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMailContext.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMailContext.java?view=diff&rev=470739&r1=470738&r2=470739
==============================================================================
--- james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMailContext.java (original)
+++ james/server/sandbox/mailet-refactorings/src/test/org/apache/james/test/mock/mailet/MockMailContext.java Fri Nov 3 01:47:22 2006
@@ -19,9 +19,13 @@
package org.apache.james.test.mock.mailet;
+import org.apache.mailet.MailFactory;
+import org.apache.mailet.MailRepository;
import org.apache.mailet.MailetContext;
import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
+import org.apache.mailet.MailetException;
+import org.apache.mailet.UsersRepository;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
@@ -120,5 +124,29 @@
public Iterator getSMTPHostAddresses(String domainName) {
return null; // trivial implementation
+ }
+
+ /**
+ * @see org.apache.mailet.MailetContext#getMailFactory()
+ */
+ public MailFactory getMailFactory() {
+
+ throw new UnsupportedOperationException("MOCKed method");
+ }
+
+ /**
+ * @see org.apache.mailet.MailetContext#getMailRepository(java.lang.String)
+ */
+ public MailRepository getMailRepository(String repoURL) throws MailetException {
+
+ throw new UnsupportedOperationException("MOCKed method");
+ }
+
+ /**
+ * @see org.apache.mailet.MailetContext#getUsersRepository(java.lang.String)
+ */
+ public UsersRepository getUsersRepository(String repoURL) throws MailetException {
+
+ throw new UnsupportedOperationException("MOCKed method");
}
}
Modified: james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java?view=diff&rev=470739&r1=470738&r2=470739
==============================================================================
--- james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java (original)
+++ james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractRemoteAddrInNetworkTest.java Fri Nov 3 01:47:22 2006
@@ -186,6 +186,33 @@
"Unimplemented mock service");
}
+ public void dispose() {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setRemoteAddr(String hostAddress) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setRemoteHost(String hostName) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setSender(MailAddress reversePath) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+ }
+
};
}
Modified: james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractSenderIsTest.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractSenderIsTest.java?view=diff&rev=470739&r1=470738&r2=470739
==============================================================================
--- james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractSenderIsTest.java (original)
+++ james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/AbstractSenderIsTest.java Fri Nov 3 01:47:22 2006
@@ -174,6 +174,34 @@
"Unimplemented mock service");
}
+ public void dispose() {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setRemoteAddr(String hostAddress) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setRemoteHost(String hostName) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
+ public void setSender(MailAddress reversePath) {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+
+ }
+
};
}
Modified: james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/HostIsLocalTest.java
URL: http://svn.apache.org/viewvc/james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/HostIsLocalTest.java?view=diff&rev=470739&r1=470738&r2=470739
==============================================================================
--- james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/HostIsLocalTest.java (original)
+++ james/server/sandbox/mailet-refactorings/src/test/org/apache/james/transport/matchers/HostIsLocalTest.java Fri Nov 3 01:47:22 2006
@@ -25,8 +25,12 @@
import org.apache.mailet.Mail;
import org.apache.mailet.MailAddress;
+import org.apache.mailet.MailFactory;
+import org.apache.mailet.MailRepository;
import org.apache.mailet.MailetContext;
+import org.apache.mailet.MailetException;
import org.apache.mailet.Matcher;
+import org.apache.mailet.UsersRepository;
import javax.mail.MessagingException;
import javax.mail.internet.MimeMessage;
@@ -183,6 +187,24 @@
public Iterator getSMTPHostAddresses(String domainName) {
throw new UnsupportedOperationException(
"Unimplemented mock service");
+ }
+
+ public MailFactory getMailFactory() {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+ }
+
+ public MailRepository getMailRepository(String repoURL) throws MailetException {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
+ }
+
+ public UsersRepository getUsersRepository(String repoURL) throws MailetException {
+
+ throw new UnsupportedOperationException(
+ "Unimplemented mock service");
}
};
---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org