You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by ep...@apache.org on 2004/10/29 13:43:55 UTC
cvs commit: jakarta-commons-sandbox/email/src/test/org/apache/commons/mail HtmlEmailTest.java EmailTest.java MultiPartEmailTest.java BaseEmailTestCase.java
epugh 2004/10/29 04:43:55
Modified: email/src/test/org/apache/commons/mail HtmlEmailTest.java
EmailTest.java MultiPartEmailTest.java
BaseEmailTestCase.java
Log:
Tweaked where we stopped/started Dumbster so the EmailTest actually sends the email now..
Revision Changes Path
1.7 +5 -1 jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/HtmlEmailTest.java
Index: HtmlEmailTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/HtmlEmailTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- HtmlEmailTest.java 29 Oct 2004 11:18:50 -0000 1.6
+++ HtmlEmailTest.java 29 Oct 2004 11:43:54 -0000 1.7
@@ -25,6 +25,7 @@
import org.apache.commons.mail.mocks.MockHtmlEmailConcrete;
+import com.dumbster.smtp.SimpleSmtpServer;
import com.dumbster.smtp.SmtpMessage;
/**
@@ -135,6 +136,9 @@
/** */
public void testSend() throws Exception
{
+ if(fakeMailServer==null || !fakeMailServer.isStopped()){
+ this.fakeMailServer = SimpleSmtpServer.start(25);
+ }
EmailAttachment attachment = new EmailAttachment();
File testFile = null;
1.8 +5 -2 jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/EmailTest.java
Index: EmailTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/EmailTest.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- EmailTest.java 29 Oct 2004 11:33:06 -0000 1.7
+++ EmailTest.java 29 Oct 2004 11:43:54 -0000 1.8
@@ -33,6 +33,7 @@
import org.apache.commons.mail.mocks.MockEmailConcrete;
+import com.dumbster.smtp.SimpleSmtpServer;
import com.dumbster.smtp.SmtpMessage;
/**
@@ -1441,7 +1442,9 @@
*/
public void testSend() throws Exception
{
-
+ if(fakeMailServer==null || !fakeMailServer.isStopped()){
+ this.fakeMailServer = SimpleSmtpServer.start(25);
+ }
// ====================================================================
// Test Success
// ====================================================================
1.7 +5 -2 jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/MultiPartEmailTest.java
Index: MultiPartEmailTest.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/MultiPartEmailTest.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- MultiPartEmailTest.java 29 Oct 2004 11:18:50 -0000 1.6
+++ MultiPartEmailTest.java 29 Oct 2004 11:43:54 -0000 1.7
@@ -28,6 +28,7 @@
import org.apache.commons.lang.StringUtils;
import org.apache.commons.mail.mocks.MockMultiPartEmailConcrete;
+import com.dumbster.smtp.SimpleSmtpServer;
import com.dumbster.smtp.SmtpMessage;
/**
@@ -130,7 +131,9 @@
/** */
public void testSend() throws Exception
{
-
+ if(fakeMailServer==null || !fakeMailServer.isStopped()){
+ this.fakeMailServer = SimpleSmtpServer.start(25);
+ }
// ====================================================================
// Test Success
// ====================================================================
1.3 +7 -7 jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/BaseEmailTestCase.java
Index: BaseEmailTestCase.java
===================================================================
RCS file: /home/cvs/jakarta-commons-sandbox/email/src/test/org/apache/commons/mail/BaseEmailTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- BaseEmailTestCase.java 29 Oct 2004 11:33:06 -0000 1.2
+++ BaseEmailTestCase.java 29 Oct 2004 11:43:54 -0000 1.3
@@ -88,20 +88,20 @@
protected void setUp()
{
// reusable objects to be used across multiple tests
- if(fakeMailServer==null || fakeMailServer.isStopped()){
- this.fakeMailServer = SimpleSmtpServer.start(25);
- }
+ // if(fakeMailServer==null || fakeMailServer.isStopped()){
+ // this.fakeMailServer = SimpleSmtpServer.start(25);
+ // }
}
/** */
protected void tearDown()
{
// stop the fake email server (if started)
- if (!this.fakeMailServer.isStopped())
- {
+ // if (!this.fakeMailServer.isStopped())
+ //{
//this.fakeMailServer.stop();
//this.fakeMailServer = null;
- }
+ //}
}
protected void saveEmailToFile(SmtpMessage email) throws Exception{
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org