org.apache.commons.mail
Class HtmlEmailTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.mail.BaseEmailTestCase
              extended by org.apache.commons.mail.HtmlEmailTest
All Implemented Interfaces:
junit.framework.Test

public class HtmlEmailTest
extends BaseEmailTestCase

JUnit test case for HtmlEmail Class

Since:
1.0
Version:
$Id: HtmlEmailTest.java 545815 2007-06-09 23:46:00Z bspeakmon $
Author:
Corey Scott

Field Summary
 
Fields inherited from class org.apache.commons.mail.BaseEmailTestCase
BODY_END_PAD, BODY_START_PAD, fakeMailServer, strTestMailFrom, strTestMailServer, strTestMailTo, strTestPasswd, strTestURL, strTestUser, testCharsNotValid, testCharsValid
 
Constructor Summary
HtmlEmailTest(String name)
           
 
Method Summary
protected  void setUp()
           
 void testEmbedDataSource()
           
 void testEmbedFile()
           
 void testEmbedUrl()
           
 void testEmbedUrlAndFile()
           
 void testGetSetHtmlMsg()
           
 void testGetSetMsg()
           
 void testGetSetTextMsg()
           
 void testSend()
           
 void testSend2()
           
 
Methods inherited from class org.apache.commons.mail.BaseEmailTestCase
getMailServer, getMailServerPort, getMessageAsString, isMailServerStopped, saveEmailToFile, tearDown, validateSend, validateSend, validateSend
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HtmlEmailTest

public HtmlEmailTest(String name)
Parameters:
name - name
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

testGetSetTextMsg

public void testGetSetTextMsg()
                       throws org.apache.commons.mail.EmailException
Throws:
EmailException

testGetSetHtmlMsg

public void testGetSetHtmlMsg()
                       throws org.apache.commons.mail.EmailException
Throws:
EmailException - if setting the message fails

testGetSetMsg

public void testGetSetMsg()
                   throws org.apache.commons.mail.EmailException
Throws:
EmailException

testEmbedUrl

public void testEmbedUrl()
                  throws Exception
Throws:
Exception - Exception

testEmbedFile

public void testEmbedFile()
                   throws Exception
Throws:
Exception

testEmbedUrlAndFile

public void testEmbedUrlAndFile()
                         throws Exception
Throws:
Exception

testEmbedDataSource

public void testEmbedDataSource()
                         throws Exception
Throws:
Exception

testSend

public void testSend()
              throws org.apache.commons.mail.EmailException,
                     IOException
Throws:
EmailException - when bad addresses and attachments are used
IOException - if creating a temp file, URL or sending fails

testSend2

public void testSend2()
               throws Exception
Throws:
Exception - Exception


Copyright © 2001-2010 Apache Software Foundation. All Rights Reserved.