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:
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 String EMAIL
           
static String LOCALHOST
           
static String MESSAGE
           
static boolean NO_INITIAL_EMAIL
           
static String PASSWORD
           
static String PROVIDER
           
static boolean SEND_INITIAL_EMAIL
           
static int START_ATTEMPTS
           
static long STARTUP_PERIOD_MS
           
static int TEST_ATTEMPTS
           
static String USER
           
 
Fields inherited from class org.mule.transport.AbstractConnectorTestCase
connectorName
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
callbackCalled, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, logger, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE
 
Constructor Summary
protected AbstractMailConnectorFunctionalTestCase(boolean initialEmail, String protocol, int port)
           
 
Method Summary
protected  void assertMessageOk(Object message)
           
protected  void doSetUp()
           
protected  void doTearDown()
           
protected  GreenMail getServers()
           
 String getTestEndpointURI()
           
 Object getValidMessage()
           
protected  String uniqueName(String root)
           
 
Methods inherited from class org.mule.transport.AbstractConnectorTestCase
createConnector, getConnector, testConnectorBeanProps, testConnectorExceptionHandling, testConnectorInitialise, testConnectorLifecycle, testConnectorListenerSupport, testConnectorMessageAdapter, testConnectorMessageDispatcherFactory, testConnectorMessageRequesterFactory
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
configureMuleContext, createMuleContext, createTestInfo, createWatchdog, disposeManager, getBuilder, getConfigurationResources, getName, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEvent, getTestInfo, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransformer, handleTimeout, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isOffline, isStartContext, registerTestMethod, run, runBare, setDisposeManagerPerSuite, setName, setStartContext, setUp, suitePostTearDown, suitePreSetUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

LOCALHOST

public static final String LOCALHOST
See Also:
Constant Field Values

USER

public static final String USER
See Also:
Constant Field Values

PROVIDER

public static final String PROVIDER
See Also:
Constant Field Values

EMAIL

public static final String EMAIL
See Also:
Constant Field Values

PASSWORD

public static final String PASSWORD
See Also:
Constant Field Values

MESSAGE

public static final 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,
                                                  String protocol,
                                                  int port)
Method Detail

doSetUp

protected void doSetUp()
                throws Exception
Overrides:
doSetUp in class AbstractConnectorTestCase
Throws:
Exception

doTearDown

protected void doTearDown()
                   throws Exception
Overrides:
doTearDown in class AbstractConnectorTestCase
Throws:
Exception

getServers

protected GreenMail getServers()

getValidMessage

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

getTestEndpointURI

public String getTestEndpointURI()
Specified by:
getTestEndpointURI in class AbstractConnectorTestCase

assertMessageOk

protected void assertMessageOk(Object message)
                        throws Exception
Throws:
Exception

uniqueName

protected String uniqueName(String root)


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