Class jala.Test.SmtpServer
Object
   |
   +--jala.Test.SmtpServer
   
   - class 
   jala.Test.SmtpServer
   
 
   
   
   
Instances of this class represent an SMTP server listening on
 localhost. By default jala.Test will create a global variable called
 "smtpServer" that contains an instance of this class. To use the server call
 start() in a test method (eg. in the basic setup method) and
 stop() in the cleanup method.
 
Defined in Global/jala.Test.js
   
   
   
 
   
 
| 
Method Summary | 
   
      
	 
	     Array
	 
       | 
      
	 
	    
	       getMessages()
	 
	  
	           
	 Returns an array containing all mails received by the server,
 where each one is an instance of jala.Test.SmtpServer.Message
       | 
   
   
      
	 
	     void
	 
       | 
      
	 
	    
	       start()
	 
	  
	           
	 Starts the SMTP server.
       | 
   
   
      
	 
	     void
	 
       | 
      
	 
	    
	       stop()
	 
	  
	           
	 Stops the SMTP server and switches the "smtp" property of the tested
 application back to the value defined in app or server.properties
       | 
   
    
jala.Test.SmtpServer
jala.Test.SmtpServer(<Number> port)
   Creates a new SmtpServer instance
   
   Parameters:
   
     port -  Optional port to listen on (defaults to 25)  
     
   
   
   
   
   Returns:
     
     A newly created SmtpServer instance   
     
   
   
   getMessages
   Array getMessages()
   
      
   
   
   
   
   
   
   Returns:
        
        An array with all messages   
        
   
   
   
   
   
   
   start
   void start()
   
      Starts the SMTP server. Note that this method switches the SMTP server as
 defined in app.properties of the tested application or server.properties
 to "localhost" to ensure that all mails sent during tests are received
 by this server. The SMTP server definition is switched back to the
 original when stop() is called.
   
   
   
   
   
   
   
   
   
   stop
   void stop()
   
      Stops the SMTP server and switches the "smtp" property of the tested
 application back to the value defined in app or server.properties
   
   
   
   
   
   
   
   
Documentation generated by 
JSDoc on Tue Jan  8 15:50:17 2008