public abstract class AbstractEmailFunctionalTestCase extends AbstractServiceAndFlowTestCase
AbstractServiceAndFlowTestCase.ConfigVariant
Modifier and Type | Field and Description |
---|---|
protected static String |
CONFIG_BASE |
protected static String |
DEFAULT_EMAIL |
protected static String |
DEFAULT_MESSAGE |
protected static String |
DEFAULT_PASSWORD |
protected static String |
DEFAULT_PROCESSED_MAILBOX |
protected static String |
DEFAULT_USER |
static long |
DELIVERY_DELAY_MS |
DynamicPort |
dynamicPort1 |
DynamicPort |
dynamicPort2 |
protected static boolean |
MIME_MESSAGE |
protected com.icegreen.greenmail.util.GreenMail |
server |
protected com.icegreen.greenmail.util.ServerSetup |
setup |
protected com.icegreen.greenmail.util.ServerSetup |
smtpSetup |
protected static boolean |
STRING_MESSAGE |
configResources, variant
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE, TEST_PAYLOAD, WORKING_DIRECTORY_SYSTEM_PROPERTY_KEY, workingDirectory
DEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY, TESTING_MODE_PROPERTY_NAME
Modifier and Type | Method and Description |
---|---|
protected MuleContext |
createMuleContext() |
protected void |
doRequest() |
protected void |
doSend() |
void |
doTearDown()
Enables the adding of extra behavior on the tear down stage of a test
before the mule context is disposed in
AbstractMuleContextTestCase.disposeContextPerTest() . |
protected void |
generateAndStoreEmail()
Generates and store emails on the server.
|
void |
setAddAttachments(boolean addAttachments) |
protected void |
storeEmail(List<MimeMessage> messages)
Helper method to store email on the server.
|
protected void |
verifyMessage(MimeMessage received) |
protected void |
verifyMessage(MimeMultipart mimeMultipart) |
protected void |
verifyMessage(String receivedText) |
doSetUp, doSetUpForFlow, doSetUpForService, getConfigFile, getConfigFiles, getTestHeader
clearFlowAssertions, getBuilder, getComponent, getComponent, getConfigResources, getFlowConstruct, getFunctionalTestComponent, getSubFlow, loadResource, loadResourceAsString, lookupFlowConstruct, runFlow, runFlow, runFlow, runFlowAndExpect, runFlowAndExpectProperty, runFlowWithPayloadAndExpect, runSchedulersOnce, stopFlowConstruct, stopFlowSchedulers, testFlow, testFlow
addBuilders, configureMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUpBeforeMuleContextCreation, doTearDownAfterMuleContextDispose, getConfigurationResources, getFileInsideWorkingDirectory, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestMuleMessage, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, getWorkingDirectory, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
clearExcludedFlag, clearRequestContext, clearTestCaseName, createTestTimeoutRule, dumpFilteredThreadsInTest, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile, takeTestCaseName
public static final long DELIVERY_DELAY_MS
protected static final String CONFIG_BASE
protected static final boolean MIME_MESSAGE
protected static final boolean STRING_MESSAGE
protected static final String DEFAULT_EMAIL
protected static final String DEFAULT_USER
protected static final String DEFAULT_MESSAGE
protected static final String DEFAULT_PASSWORD
protected static final String DEFAULT_PROCESSED_MAILBOX
protected com.icegreen.greenmail.util.GreenMail server
protected com.icegreen.greenmail.util.ServerSetup setup
protected com.icegreen.greenmail.util.ServerSetup smtpSetup
public DynamicPort dynamicPort1
public DynamicPort dynamicPort2
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol)
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol, Locale locale, String charset)
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol, String configResources)
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol, String configResources, String message)
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol, String configResources, boolean addSmtp)
protected AbstractEmailFunctionalTestCase(AbstractServiceAndFlowTestCase.ConfigVariant variant, boolean isMimeMessage, String protocol, String configResources, Locale locale, String charset)
protected MuleContext createMuleContext() throws Exception
createMuleContext
in class AbstractMuleContextTestCase
Exception
public void doTearDown()
AbstractMuleContextTestCase
AbstractMuleContextTestCase.disposeContextPerTest()
.
Under normal circumstances this method could be replace with a
@After
annotated method.
doTearDown
in class AbstractMuleContextTestCase
protected void verifyMessage(MimeMessage received) throws Exception
Exception
protected void verifyMessage(MimeMultipart mimeMultipart) throws Exception
Exception
protected void verifyMessage(String receivedText)
protected void generateAndStoreEmail() throws Exception
Exception
- If there's a problem with the storing of the messages in the server.protected void storeEmail(List<MimeMessage> messages) throws Exception
messages
- The list of messages to be stored.Exception
- If there's a problem with the storing of the messages in the server.public void setAddAttachments(boolean addAttachments)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.