org.mule.providers.email
Class EmailRoundTripTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.tck.FunctionalTestCase
                  extended by org.mule.providers.email.EmailRoundTripTestCase
All Implemented Interfaces:
Test, org.mule.tck.TestCaseWatchdogTimeoutHandler

public class EmailRoundTripTestCase
extends org.mule.tck.FunctionalTestCase

This demonstrates "round trip" processing of email - an email is pulled from a POP server and then sent to an SMTP server. While within Mule the message is serialized as RFC822 encoded bytes (this would let the message be transmitted over JMS etc).

The email servers for the test are managed by the greenMailSupport instance. The Mule services (defined in email-round-trip-test.xml) are started by the test framework. So all we need to do here is test that the message is handled correctly.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
org.mule.tck.AbstractMuleTestCase.TestInfo
 
Field Summary
static long WAIT_MS
           
 
Fields inherited from class org.mule.tck.FunctionalTestCase
DEFAULT_BUILDER_CLASS
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
IGNORED_DOT_MULE_DIRS, logger
 
Constructor Summary
EmailRoundTripTestCase()
           
 
Method Summary
protected  void doFunctionalTearDown()
          Stop the servers when the test ends
protected  void doPreFunctionalSetUp()
          Start the servers when the test starts
protected  String getConfigResources()
           
 void testRoundTrip()
           
 
Methods inherited from class org.mule.tck.FunctionalTestCase
doPostFunctionalSetUp, doSetUp, doTearDown, getBuilder, setupManager, suitePreSetUp
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
createTestInfo, createWatchdog, disposeManager, getDefaultModel, getManager, getName, getTestComponent, getTestConnector, getTestDescriptor, getTestEndpoint, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestInfo, getTestManager, getTestSession, getTestTransformer, handleTimeout, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isOffline, run, runBare, setDisposeManagerPerSuite, setUp, suitePostSetUp, suitePostTearDown, suitePreTearDown, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WAIT_MS

public static final long WAIT_MS
See Also:
Constant Field Values
Constructor Detail

EmailRoundTripTestCase

public EmailRoundTripTestCase()
Method Detail

getConfigResources

protected String getConfigResources()
Specified by:
getConfigResources in class org.mule.tck.FunctionalTestCase

testRoundTrip

public void testRoundTrip()
                   throws org.mule.umo.UMOException,
                          InterruptedException
Throws:
org.mule.umo.UMOException
InterruptedException

doPreFunctionalSetUp

protected void doPreFunctionalSetUp()
                             throws Exception
Start the servers when the test starts

Overrides:
doPreFunctionalSetUp in class org.mule.tck.FunctionalTestCase
Throws:
Exception

doFunctionalTearDown

protected void doFunctionalTearDown()
                             throws Exception
Stop the servers when the test ends

Overrides:
doFunctionalTearDown in class org.mule.tck.FunctionalTestCase
Throws:
Exception


Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.