org.mule.providers.email
Class RoundTripTestCase

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.mule.tck.AbstractMuleTestCase
              extended byorg.mule.tck.FunctionalTestCase
                  extended byorg.mule.providers.email.RoundTripTestCase
All Implemented Interfaces:
Test

public class RoundTripTestCase
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 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 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
logger
 
Constructor Summary
RoundTripTestCase()
           
 
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
addTest, disposeManager, finalize, getDefaultModel, getManager, getName, getTestComponent, getTestConnector, getTestDescriptor, getTestEndpoint, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestInfo, getTestManager, getTestSession, getTestTransformer, isDisabledInThisEnvironment, isDisabledInThisEnvironment, 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, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

WAIT_MS

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

RoundTripTestCase

public RoundTripTestCase()
Method Detail

getConfigResources

protected String getConfigResources()

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

Throws:
Exception

doFunctionalTearDown

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

Throws:
Exception


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