| org.apache.commons.mail.BaseEmailTestCase
All known Subclasses: org.apache.commons.mail.EmailAttachmentTest, org.apache.commons.mail.HtmlEmailTest, org.apache.commons.mail.MultiPartEmailTest, org.apache.commons.mail.SimpleEmailTest, org.apache.commons.mail.SendWithAttachmentsTest, org.apache.commons.mail.InvalidInternetAddressTest, org.apache.commons.mail.InvalidAddressTest, org.apache.commons.mail.EmailTest,
BaseEmailTestCase | public class BaseEmailTestCase extends TestCase (Code) | | Base test case for Email test classes
since: 1.0 author: Corey Scott author: Eric Pugh version: $Id: BaseEmailTestCase.java 279300 2005-09-07 11:43:52Z henning $ |
Method Summary | |
public void | getMailServer() | protected int | getMailServerPort() | public String | getMessageAsString(int intMsgNo) | protected void | saveEmailToFile(SmtpMessage email) | protected void | setUp() | protected void | tearDown() | protected SmtpMessage | validateSend(SimpleSmtpServer mailServer, String strSubject, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) | protected void | validateSend(SimpleSmtpServer mailServer, String strSubject, Multipart content, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) | protected void | validateSend(SimpleSmtpServer mailServer, String strSubject, String strMessage, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) |
BODY_END_PAD | final public static int BODY_END_PAD(Code) | | Padding at end of body added by dumbser/send
|
BODY_START_PAD | final public static int BODY_START_PAD(Code) | | Padding at start of body added by dumbser/send
|
fakeMailServer | protected SimpleSmtpServer fakeMailServer(Code) | | The fake Dumbster email server
|
strTestMailFrom | protected String strTestMailFrom(Code) | | From address for the test email
|
strTestMailServer | protected String strTestMailServer(Code) | | Mail server used for testing
|
strTestMailTo | protected String strTestMailTo(Code) | | Destination address for the test email
|
strTestPasswd | protected String strTestPasswd(Code) | | Mailserver strTestPasswd (set if needed)
|
strTestURL | protected String strTestURL(Code) | | URL to used to test URL attachmetns (Must be valid)
|
strTestUser | protected String strTestUser(Code) | | Mailserver username (set if needed)
|
testCharsNotValid | protected String[] testCharsNotValid(Code) | | Array of test strings
|
testCharsValid | protected String[] testCharsValid(Code) | | Test characters acceptable to email
|
BaseEmailTestCase | public BaseEmailTestCase(String name)(Code) | | Parameters: name - name |
getMailServer | public void getMailServer()(Code) | | |
getMailServerPort | protected int getMailServerPort()(Code) | | |
getMessageAsString | public String getMessageAsString(int intMsgNo)(Code) | | Parameters: intMsgNo - the message to retrieve message as string |
saveEmailToFile | protected void saveEmailToFile(SmtpMessage email) throws IOException(Code) | | Parameters: email - email throws: IOException - Exception |
setUp | protected void setUp()(Code) | | |
tearDown | protected void tearDown()(Code) | | |
validateSend | protected SmtpMessage validateSend(SimpleSmtpServer mailServer, String strSubject, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) throws IOException(Code) | | Validate the message was sent properly
Parameters: mailServer - reference to the fake mail server Parameters: strSubject - expected subject Parameters: fromAdd - expected from address Parameters: toAdd - list of expected to addresses Parameters: ccAdd - list of expected cc addresses Parameters: bccAdd - list of expected bcc addresses Parameters: boolSaveToFile - true will output to file, false doesnt SmtpMessage email to check throws: IOException - Exception |
validateSend | protected void validateSend(SimpleSmtpServer mailServer, String strSubject, Multipart content, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) throws IOException(Code) | | Validate the message was sent properly
Parameters: mailServer - reference to the fake mail server Parameters: strSubject - expected subject Parameters: content - the expected message content Parameters: fromAdd - expected from address Parameters: toAdd - list of expected to addresses Parameters: ccAdd - list of expected cc addresses Parameters: bccAdd - list of expected bcc addresses Parameters: boolSaveToFile - true will output to file, false doesnt throws: IOException - Exception |
validateSend | protected void validateSend(SimpleSmtpServer mailServer, String strSubject, String strMessage, InternetAddress fromAdd, List toAdd, List ccAdd, List bccAdd, boolean boolSaveToFile) throws IOException(Code) | | Validate the message was sent properly
Parameters: mailServer - reference to the fake mail server Parameters: strSubject - expected subject Parameters: strMessage - the expected message as a string Parameters: fromAdd - expected from address Parameters: toAdd - list of expected to addresses Parameters: ccAdd - list of expected cc addresses Parameters: bccAdd - list of expected bcc addresses Parameters: boolSaveToFile - true will output to file, false doesnt throws: IOException - Exception |
|
|