org.apache.commons.mail
Class MultiPartEmailTest

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.MultiPartEmailTest
All Implemented Interfaces:
junit.framework.Test

public class MultiPartEmailTest
extends BaseEmailTestCase

JUnit test case for MultiPartEmail Class

Since:
1.0
Version:
$Id: MultiPartEmailTest.java 512622 2007-02-28 06:35:45Z dion $
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
MultiPartEmailTest(String name)
           
 
Method Summary
protected  void setUp()
           
 void testAddPart()
           
 void testAddPart2()
           
 void testAttach()
           
 void testAttach2()
           
 void testAttach3()
           
 void testGetContainer()
           
 void testGetSetSubType()
          test get/set sub type
 void testInit()
          init called twice should fail
 void testSend()
           
 void testSetMsg()
           
 
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

MultiPartEmailTest

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

setUp

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

testSetMsg

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

testSend

public void testSend()
              throws org.apache.commons.mail.EmailException,
                     IOException
Throws:
EmailException - when a bad address or attachment is used
IOException - when sending fails

testAttach

public void testAttach()
                throws MalformedURLException,
                       org.apache.commons.mail.EmailException
Throws:
MalformedURLException - when a bad attachment URL is used
EmailException - when a bad address or attachment is used

testAttach2

public void testAttach2()
                 throws MalformedURLException,
                        org.apache.commons.mail.EmailException
Throws:
MalformedURLException - when a bad attachment URL is used
EmailException - when a bad address or attachment is used

testAttach3

public void testAttach3()
                 throws MalformedURLException,
                        org.apache.commons.mail.EmailException
Throws:
MalformedURLException - when a bad attachment URL is used
EmailException - when a bad address or attachment is used

testAddPart

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

testAddPart2

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

testGetContainer

public void testGetContainer()

testInit

public void testInit()
init called twice should fail


testGetSetSubType

public void testGetSetSubType()
test get/set sub type



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