org.mule.providers.email
Class AbstractMailConnectorFunctionalTestCase
java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.mule.tck.AbstractMuleTestCase
org.mule.tck.providers.AbstractConnectorTestCase
org.mule.providers.email.AbstractMailConnectorFunctionalTestCase
- All Implemented Interfaces:
- Test
- Direct Known Subclasses:
- AbstractReceivingMailConnectorTestCase, SmtpConnectorTestCase
- public abstract class AbstractMailConnectorFunctionalTestCase
- extends org.mule.tck.providers.AbstractConnectorTestCase
Start a (greenmail) mail server with a known message, for use in subclasses.
Each test gets a new set of ports to avoid conflicts (shouldn't be needed, but
greenmail doesn't seem to be closing ports). Also contains utility methods
for comparing emails, building endpoints, etc.
Nested classes inherited from class org.mule.tck.AbstractMuleTestCase |
org.mule.tck.AbstractMuleTestCase.TestInfo |
Fields inherited from class org.mule.tck.providers.AbstractConnectorTestCase |
connector, descriptor, model |
Fields inherited from class org.mule.tck.AbstractMuleTestCase |
logger |
Methods inherited from class org.mule.tck.providers.AbstractConnectorTestCase |
getTestEndpointURI, testConnectorBeanProps, testConnectorExceptionHandling, testConnectorInitialise, testConnectorLifecycle, testConnectorListenerSupport, testConnectorMessageAdapter, testConnectorMessageDispatcherFactory |
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, suitePreSetUp, suitePreTearDown, tearDown |
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 |
RETRY_LIMIT
public static final int RETRY_LIMIT
- See Also:
- Constant Field Values
LOCALHOST
public static final String LOCALHOST
- See Also:
- Constant Field Values
USER
public static final String USER
- See Also:
- Constant Field Values
FROM
public static final String FROM
- See Also:
- Constant Field Values
TO
public static final String TO
- See Also:
- Constant Field Values
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
AbstractMailConnectorFunctionalTestCase
protected AbstractMailConnectorFunctionalTestCase(boolean initialEmail,
String connectorName)
doSetUp
protected void doSetUp()
throws Exception
- Throws:
Exception
doTearDown
protected void doTearDown()
throws Exception
- Throws:
Exception
startServers
protected void startServers()
throws Exception
- Throws:
Exception
stopServers
protected void stopServers()
throws Exception
- Throws:
Exception
getServers
protected Servers getServers()
getValidMessage
public Object getValidMessage()
throws Exception
- Throws:
Exception
getConnectorName
public String getConnectorName()
getConnector
public org.mule.umo.provider.UMOConnector getConnector()
throws Exception
- Throws:
Exception
getConnector
public abstract org.mule.umo.provider.UMOConnector getConnector(boolean init)
throws Exception
- Throws:
Exception
getPop3TestEndpointURI
protected String getPop3TestEndpointURI()
getPop3sTestEndpointURI
protected String getPop3sTestEndpointURI()
getImapTestEndpointURI
protected String getImapTestEndpointURI()
getImapsTestEndpointURI
protected String getImapsTestEndpointURI()
getSmtpTestEndpointURI
protected String getSmtpTestEndpointURI()
getSmtpsTestEndpointURI
protected String getSmtpsTestEndpointURI()
assertMessageOk
protected void assertMessageOk(Object message)
throws Exception
- Throws:
Exception
repeatTest
protected void repeatTest(String method)
throws Exception
- Tests are intermittently failing due to busy ports. Here we repeat a test a number of times
(more than twice should not be necessary!) to make sure that the first failure was not due to
an active port.
- Parameters:
method
- The method name of the test
- Throws:
Exception
- If the failure occurs repeatedly
Copyright © 2003-2008 MuleSource, Inc.. All Rights Reserved.