org.mule.transport
Class ConnectorLifecycleTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.transport.ConnectorLifecycleTestCase

public class ConnectorLifecycleTestCase
extends AbstractMuleContextTestCase

Tests that lifecycle methods on a connector are not processed more than once. (@see MULE-3062) Also test lifecycle of a connector dispatchers, receivers, workManagers and scheduler.


Field Summary
 
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
ConnectorLifecycleTestCase()
           
 
Method Summary
protected  javax.resource.spi.work.Work createSomeWork()
           
 void doSetUp()
          Enables the adding of extra behavior on the set up stage of a test right after the creation of the mule context in AbstractMuleContextTestCase.setUpMuleContext().
 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().
 void testDispatcherFullLifecycle()
           
 void testDispatchersLifecycle()
           
 void testDoubleDisposeConnector()
          This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).
 void testDoubleDisposeConnectorStartOnly()
          This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).
 void testDoubleDisposeConnectorStartStop()
          This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).
 void testDoubleInitialiseConnector()
          This test ensures that the connector is only initialised once even on a direct initialisation (not through Mule).
 void testDoubleStartConnector()
          This test ensures that the connector is only started once even on a direct restart (not through Mule).
 void testDoubleStopConnector()
          This test ensures that the connector is only stopped once even on a direct restop (not through Mule).
 void testReceiversLifecycle()
           
 void testReceiversServiceLifecycle()
           
 void testRequesterFullLifecycle()
           
 void testRequestersLifecycle()
           
 void testSchedulerLifecycle()
           
 void testWorkManagerLifecycle()
           
 
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

ConnectorLifecycleTestCase

public ConnectorLifecycleTestCase()
Method Detail

doSetUp

public void doSetUp()
             throws Exception
Description copied from class: AbstractMuleContextTestCase
Enables the adding of extra behavior on the set up stage of a test right after the creation of the mule context in AbstractMuleContextTestCase.setUpMuleContext().

Under normal circumstances this method could be replaced by a @Before annotated method.

Overrides:
doSetUp in class AbstractMuleContextTestCase
Throws:
Exception - if something fails that should halt the test case

doTearDown

public void doTearDown()
                throws Exception
Description copied from class: AbstractMuleContextTestCase
Enables the adding of extra behavior on the tear down stage of a test before the mule context is disposed in AbstractMuleContextTestCase.disposeContextPerTest().

Under normal circumstances this method could be replace with a @After annotated method.

Overrides:
doTearDown in class AbstractMuleContextTestCase
Throws:
Exception - if something fails that should halt the testcase

testDoubleInitialiseConnector

public void testDoubleInitialiseConnector()
                                   throws Exception
This test ensures that the connector is only initialised once even on a direct initialisation (not through Mule).

Throws:
Exception - if things go pear-shaped

testDoubleStartConnector

public void testDoubleStartConnector()
                              throws Exception
This test ensures that the connector is only started once even on a direct restart (not through Mule).

Throws:
Exception - if things go pear-shaped

testDoubleStopConnector

public void testDoubleStopConnector()
                             throws Exception
This test ensures that the connector is only stopped once even on a direct restop (not through Mule).

Throws:
Exception - if things go pear-shaped

testDoubleDisposeConnectorStartStop

public void testDoubleDisposeConnectorStartStop()
                                         throws Exception
This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).

Throws:
Exception - if things go pear-shaped

testDoubleDisposeConnectorStartOnly

public void testDoubleDisposeConnectorStartOnly()
                                         throws Exception
This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).

Throws:
Exception - if things go pear-shaped

testDoubleDisposeConnector

public void testDoubleDisposeConnector()
                                throws Exception
This test ensures that the connector is only disposed once even on a direct disposal (not through Mule).

Throws:
Exception - if things go pear-shaped

testReceiversLifecycle

public void testReceiversLifecycle()
                            throws Exception
Throws:
Exception

testReceiversServiceLifecycle

public void testReceiversServiceLifecycle()
                                   throws Exception
Throws:
Exception

testDispatchersLifecycle

public void testDispatchersLifecycle()
                              throws Exception
Throws:
Exception

testDispatcherFullLifecycle

public void testDispatcherFullLifecycle()
                                 throws Exception
Throws:
Exception

testRequestersLifecycle

public void testRequestersLifecycle()
                             throws Exception
Throws:
Exception

testRequesterFullLifecycle

public void testRequesterFullLifecycle()
                                throws Exception
Throws:
Exception

testWorkManagerLifecycle

public void testWorkManagerLifecycle()
                              throws MuleException,
                                     javax.resource.spi.work.WorkException
Throws:
MuleException
javax.resource.spi.work.WorkException

testSchedulerLifecycle

public void testSchedulerLifecycle()
                            throws MuleException,
                                   javax.resource.spi.work.WorkException
Throws:
MuleException
javax.resource.spi.work.WorkException

createSomeWork

protected javax.resource.spi.work.Work createSomeWork()


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