org.mule.transport.email.connectors
Class AbstractMailConnectorFunctionalTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.transport.AbstractConnectorTestCase
                  extended by org.mule.transport.email.connectors.AbstractMailConnectorFunctionalTestCase
All Implemented Interfaces:
junit.framework.Test, TestCaseWatchdogTimeoutHandler
Direct Known Subclasses:
AbstractReceivingMailConnectorTestCase, SmtpConnectorTestCase

public abstract class AbstractMailConnectorFunctionalTestCase
extends AbstractConnectorTestCase

Start a (greenmail) mail server with a known message, for use in subclasses.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
AbstractMuleTestCase.TestInfo
 
Field Summary
static java.lang.String EMAIL
           
static java.lang.String LOCALHOST
           
static java.lang.String MESSAGE
           
static boolean NO_INITIAL_EMAIL
           
static java.lang.String PASSWORD
           
static java.lang.String PROVIDER
           
static boolean SEND_INITIAL_EMAIL
           
static int START_ATTEMPTS
           
static long STARTUP_PERIOD_MS
           
static int TEST_ATTEMPTS
           
static java.lang.String USER
           
 
Fields inherited from class org.mule.transport.AbstractConnectorTestCase
connectorName, encoding
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, DEFAULT_MULE_TEST_TIMEOUT_SECS, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, logger, muleContext, numPorts, ports, PROPERTY_MULE_TEST_TIMEOUT, RECEIVE_TIMEOUT, TEST_MESSAGE, testTimeoutSecs
 
Constructor Summary
protected AbstractMailConnectorFunctionalTestCase(boolean initialEmail, java.lang.String protocol)
           
 
Method Summary
protected  void assertMessageOk(java.lang.Object mailMessage)
           
protected  void doSetUp()
          Exactly the same a AbstractMuleTestCase.setUp() in normal JUnit test cases.
protected  void doTearDown()
          Exactly the same a AbstractMuleTestCase.tearDown() in normal JUnit test cases.
protected  com.icegreen.greenmail.util.GreenMail getServers()
           
 java.lang.String getTestEndpointURI()
           
 java.lang.Object getValidMessage()
           
protected  boolean transformInboundMessage()
           
protected  java.lang.String uniqueName(java.lang.String root)
           
 
Methods inherited from class org.mule.transport.AbstractConnectorTestCase
createConnector, getConnector, getConnectorAndAssert, testConnectorBeanProps, testConnectorExceptionHandling, testConnectorInitialise, testConnectorLifecycle, testConnectorListenerSupport, testConnectorMessageDispatcherFactory, testConnectorMessageRequesterFactory, testConnectorMuleMessageFactory
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
addBuilders, checkPorts, configureMuleContext, createMuleContext, createObject, createObject, createTestInfo, createWatchdog, disposeManager, findFreePorts, getBuilder, getConfigurationResources, getPorts, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEvent, getTestInboundEvent, getTestInboundEvent, getTestInfo, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTimeoutSecs, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, giveTheTestSomeTimeToCleanUpAndThenKillIt, handleTimeout, initialiseObject, initTestTimeoutSecs, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isGracefulShutdown, isOffline, isPortFree, isStartContext, registerTestMethod, run, runBare, setDisposeManagerPerSuite, setFailOnTimeout, setName, setStartContext, setUp, suitePostTearDown, suitePreSetUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, runTest, 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
 

Field Detail

LOCALHOST

public static final java.lang.String LOCALHOST
See Also:
Constant Field Values

USER

public static final java.lang.String USER
See Also:
Constant Field Values

PROVIDER

public static final java.lang.String PROVIDER
See Also:
Constant Field Values

EMAIL

public static final java.lang.String EMAIL
See Also:
Constant Field Values

PASSWORD

public static final java.lang.String PASSWORD
See Also:
Constant Field Values

MESSAGE

public static final java.lang.String MESSAGE
See Also:
Constant Field Values

START_ATTEMPTS

public static final int START_ATTEMPTS
See Also:
Constant Field Values

TEST_ATTEMPTS

public static final int TEST_ATTEMPTS
See Also:
Constant Field Values

STARTUP_PERIOD_MS

public static final long STARTUP_PERIOD_MS
See Also:
Constant Field Values

SEND_INITIAL_EMAIL

public static final boolean SEND_INITIAL_EMAIL
See Also:
Constant Field Values

NO_INITIAL_EMAIL

public static final boolean NO_INITIAL_EMAIL
See Also:
Constant Field Values
Constructor Detail

AbstractMailConnectorFunctionalTestCase

protected AbstractMailConnectorFunctionalTestCase(boolean initialEmail,
                                                  java.lang.String protocol)
Method Detail

doSetUp

protected void doSetUp()
                throws java.lang.Exception
Description copied from class: AbstractMuleTestCase
Exactly the same a AbstractMuleTestCase.setUp() in normal JUnit test cases. this is called before a test method has been called.

Overrides:
doSetUp in class AbstractConnectorTestCase
Throws:
java.lang.Exception - if something fails that should halt the testcase

doTearDown

protected void doTearDown()
                   throws java.lang.Exception
Description copied from class: AbstractMuleTestCase
Exactly the same a AbstractMuleTestCase.tearDown() in normal JUnit test cases. this is called after a test method has been called.

Overrides:
doTearDown in class AbstractConnectorTestCase
Throws:
java.lang.Exception - if something fails that should halt the testcase

getServers

protected com.icegreen.greenmail.util.GreenMail getServers()

getValidMessage

public java.lang.Object getValidMessage()
                                 throws java.lang.Exception
Specified by:
getValidMessage in class AbstractConnectorTestCase
Throws:
java.lang.Exception

getTestEndpointURI

public java.lang.String getTestEndpointURI()
Specified by:
getTestEndpointURI in class AbstractConnectorTestCase

transformInboundMessage

protected boolean transformInboundMessage()

assertMessageOk

protected void assertMessageOk(java.lang.Object mailMessage)
                        throws java.lang.Exception
Throws:
java.lang.Exception

uniqueName

protected java.lang.String uniqueName(java.lang.String root)


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