org.mule.transport.email
Class EmailRoundTripTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.tck.junit4.FunctionalTestCase
              extended by org.mule.tck.AbstractServiceAndFlowTestCase
                  extended by org.mule.transport.email.EmailRoundTripTestCase

public class EmailRoundTripTestCase
extends AbstractServiceAndFlowTestCase

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.AbstractServiceAndFlowTestCase
AbstractServiceAndFlowTestCase.ConfigVariant
 
Field Summary
 DynamicPort dynamicPort1
           
 DynamicPort dynamicPort2
           
 DynamicPort dynamicPort3
           
 DynamicPort dynamicPort4
           
 DynamicPort dynamicPort5
           
 DynamicPort dynamicPort6
           
 
Fields inherited from class org.mule.tck.AbstractServiceAndFlowTestCase
configResources, variant
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE
 
Fields inherited from class org.mule.tck.junit4.AbstractMuleTestCase
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY
 
Constructor Summary
EmailRoundTripTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, String configResources)
           
 
Method Summary
protected  MuleContext createMuleContext()
           
protected  void doTearDown()
          Stop the servers when the test ends
static Collection<Object[]> parameters()
           
 void startServer()
          Start the servers when the test starts
 void testRoundTrip()
           
 
Methods inherited from class org.mule.tck.AbstractServiceAndFlowTestCase
doSetUp, doSetUpForFlow, doSetUpForService, getConfigResources, getTestHeader
 
Methods inherited from class org.mule.tck.junit4.FunctionalTestCase
clearFlowAssertions, getBuilder, getComponent, getComponent, getFlowConstruct, getFunctionalTestComponent, loadResource, loadResourceAsString, stopFlowConstruct, testFlow, testFlow
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, getConfigurationResources, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleTestCase
clearExcludedFlag, clearRequestContext, createTestTimeoutRule, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dynamicPort1

public DynamicPort dynamicPort1

dynamicPort2

public DynamicPort dynamicPort2

dynamicPort3

public DynamicPort dynamicPort3

dynamicPort4

public DynamicPort dynamicPort4

dynamicPort5

public DynamicPort dynamicPort5

dynamicPort6

public DynamicPort dynamicPort6
Constructor Detail

EmailRoundTripTestCase

public EmailRoundTripTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant,
                              String configResources)
Method Detail

parameters

public static Collection<Object[]> parameters()

createMuleContext

protected MuleContext createMuleContext()
                                 throws Exception
Overrides:
createMuleContext in class AbstractMuleContextTestCase
Throws:
Exception

startServer

public void startServer()
                 throws Exception
Start the servers when the test starts

Throws:
Exception

doTearDown

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

Overrides:
doTearDown in class AbstractMuleContextTestCase
Throws:
Exception

testRoundTrip

public void testRoundTrip()
                   throws MuleException,
                          InterruptedException
Throws:
MuleException
InterruptedException


Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.