commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ep...@apache.org
Subject cvs commit: jakarta-commons-sandbox/email/src/test/org/apache/commons/mail EmailTest.java BaseEmailTestCase.java
Date Fri, 29 Oct 2004 11:33:07 GMT
epugh       2004/10/29 04:33:07

  Modified:    email/src/test/org/apache/commons/mail EmailTest.java
                        BaseEmailTestCase.java
  Log:
  Trying to get dumbster to work.
  
  Revision  Changes    Path
  1.7       +3 -4      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.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- EmailTest.java	29 Oct 2004 11:18:50 -0000	1.6
  +++ EmailTest.java	29 Oct 2004 11:33:06 -0000	1.7
  @@ -1470,10 +1470,9 @@
               ht.put("X-Mailer", "Sendmail");
   
               this.email.setHeaders(ht);
  -
  +            this.email.setDebug(true);
               this.email.send();
  -            
  -            assertTrue(fakeMailServer.getReceievedEmailSize() == 1);
  +            assertEquals(1,fakeMailServer.getReceievedEmailSize());
               Iterator emailIter = fakeMailServer.getReceivedEmail();
               SmtpMessage email = (SmtpMessage)emailIter.next();
               saveEmailToFile(email);
  
  
  
  1.2       +7 -5      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BaseEmailTestCase.java	29 Oct 2004 11:18:50 -0000	1.1
  +++ BaseEmailTestCase.java	29 Oct 2004 11:33:06 -0000	1.2
  @@ -88,17 +88,19 @@
       protected void setUp()
       {
           // reusable objects to be used across multiple tests
  -        this.fakeMailServer = SimpleSmtpServer.start(this.intTestMailServerPort);
  +        if(fakeMailServer==null || fakeMailServer.isStopped()){
  +            this.fakeMailServer = SimpleSmtpServer.start(25);
  +        }
       }
   
       /** */
       protected void tearDown()
       {
           // stop the fake email server (if started)
  -        if (this.fakeMailServer != null && !this.fakeMailServer.isStopped())
  +        if (!this.fakeMailServer.isStopped())
           {
  -            this.fakeMailServer.stop();
  -            this.fakeMailServer = null;
  +            //this.fakeMailServer.stop();
  +            //this.fakeMailServer = null;
           }
       }
       
  
  
  

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


Mime
View raw message