org.mule.transport.email.connectors
Class SmtpConnectorTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.transport.AbstractConnectorTestCase
              extended by org.mule.transport.email.connectors.AbstractMailConnectorFunctionalTestCase
                  extended by org.mule.transport.email.connectors.SmtpConnectorTestCase
Direct Known Subclasses:
SmtpsConnectorTestCase

public class SmtpConnectorTestCase
extends AbstractMailConnectorFunctionalTestCase

Send a message via SMTP to a (greenmail) server.


Field Summary
 
Fields inherited from class org.mule.transport.email.connectors.AbstractMailConnectorFunctionalTestCase
dynamicPort, EMAIL, LOCALHOST, MESSAGE, NO_INITIAL_EMAIL, PASSWORD, PROVIDER, SEND_INITIAL_EMAIL, START_ATTEMPTS, STARTUP_PERIOD_MS, TEST_ATTEMPTS, USER
 
Fields inherited from class org.mule.transport.AbstractConnectorTestCase
connectorName, encoding
 
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
  SmtpConnectorTestCase()
           
protected SmtpConnectorTestCase(boolean initialEmail, String protocol)
           
 
Method Summary
 Connector createConnector()
           
 void testConnectorListenerSupport()
          The SmtpConnector does not accept listeners, so the test in the superclass makes no sense here.
 void testConnectorRestart()
           
 void testNullUsernameAndPassword()
           
 void testSend()
           
 void testSmtpDoesNotSupportOutboundEndpoints()
           
protected  boolean transformInboundMessage()
           
 
Methods inherited from class org.mule.transport.email.connectors.AbstractMailConnectorFunctionalTestCase
assertMessageOk, doSetUp, doTearDown, getServers, getTestEndpointURI, getValidMessage, uniqueName
 
Methods inherited from class org.mule.transport.AbstractConnectorTestCase
getConnector, getConnectorAndAssert, testConnectorBeanProps, testConnectorExceptionHandling, testConnectorInitialise, testConnectorLifecycle, testConnectorMessageDispatcherFactory, testConnectorMessageRequesterFactory, testConnectorMuleMessageFactory
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, getBuilder, 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, getTestHeader, 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
 

Constructor Detail

SmtpConnectorTestCase

public SmtpConnectorTestCase()

SmtpConnectorTestCase

protected SmtpConnectorTestCase(boolean initialEmail,
                                String protocol)
Method Detail

createConnector

public Connector createConnector()
                          throws Exception
Specified by:
createConnector in class AbstractConnectorTestCase
Throws:
Exception

transformInboundMessage

protected boolean transformInboundMessage()
Overrides:
transformInboundMessage in class AbstractMailConnectorFunctionalTestCase

testConnectorListenerSupport

public void testConnectorListenerSupport()
                                  throws Exception
The SmtpConnector does not accept listeners, so the test in the superclass makes no sense here. The SMTP transport does not even support inbound endpoints, as SMTP is an outbound transport only so you cannot even create an inbound endpoint to register as listener.

Overrides:
testConnectorListenerSupport in class AbstractConnectorTestCase
Throws:
Exception

testSmtpDoesNotSupportOutboundEndpoints

public void testSmtpDoesNotSupportOutboundEndpoints()
                                             throws MuleException
Throws:
MuleException

testSend

public void testSend()
              throws Exception
Throws:
Exception

testConnectorRestart

public void testConnectorRestart()
                          throws Exception
Throws:
Exception

testNullUsernameAndPassword

public void testNullUsernameAndPassword()
                                 throws Exception
Throws:
Exception


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