org.unitils.mail
Class MailModule

java.lang.Object
  extended by org.unitils.mail.MailModule
All Implemented Interfaces:
org.unitils.core.Module

public class MailModule
extends Object
implements org.unitils.core.Module

Author:
Jeroen Horemans, Thomas De Rycke, Willemijn Wouters

Field Summary
static String SMTP_DEFAULT_PORT
          property in unitils.properties to set the mail port
 
Constructor Summary
MailModule()
           
 
Method Summary
 void afterInit()
           
 org.unitils.core.TestListener getTestListener()
           
 void init(Properties configuration)
          This method will do the initialization.
 void initSmtpServer(Object testObject)
          This will initialize a new SMTP server and the method will put it in the correct field (SimpleSmtpServer) of the testedObject.
 void stopSmtpServer(Object testObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SMTP_DEFAULT_PORT

public static final String SMTP_DEFAULT_PORT
property in unitils.properties to set the mail port

See Also:
Constant Field Values
Constructor Detail

MailModule

public MailModule()
Method Detail

init

public void init(Properties configuration)
This method will do the initialization. This method checks if the user gives a smtp port otherwise the default smtp port (25) will be used.

Specified by:
init in interface org.unitils.core.Module
See Also:
Module.init(java.util.Properties)

afterInit

public void afterInit()
Specified by:
afterInit in interface org.unitils.core.Module

initSmtpServer

public void initSmtpServer(Object testObject)
This will initialize a new SMTP server and the method will put it in the correct field (SimpleSmtpServer) of the testedObject.

Parameters:
testObject - of type Object

stopSmtpServer

public void stopSmtpServer(Object testObject)
Parameters:
testObject -

getTestListener

public org.unitils.core.TestListener getTestListener()
Specified by:
getTestListener in interface org.unitils.core.Module
See Also:
Module.getTestListener()


Copyright © 2013. All Rights Reserved.