org.mule.routing.outbound
Class DefaultOutboundRouterCollectionTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.routing.outbound.DefaultOutboundRouterCollectionTestCase

public class DefaultOutboundRouterCollectionTestCase
extends AbstractMuleContextTestCase


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
DefaultOutboundRouterCollectionTestCase()
           
 
Method Summary
protected  Service createService()
           
protected  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 testMultipleDoesNotRequireCopyRouterMatchAllFalse()
          If there are multiple outbound routers but matchAll is false then we only need to copy message if the router might mutate it in isMatch, if not then no need to copy.
 void testMultipleDoesNotRequireCopyRouterMatchAllTrue()
          If there are multiple outbound routers and matchAll is true then we need a new message copy for all but the *last* router independent of whether the routers may mutate the message in isMatch or not.
 void testMultipleMixMatchAllFalse()
          If matchAll is false then we need a new message copy for each router that may mutate the message in isMatch unless it is the last router.
 void testMultipleMixMatchAllTrue()
          If matchAll is true then we need a new message copy for each and every router except the last one.
 void testMultipleRequiresCopyRouterMatchAllFalse()
          If there are multiple outbound routers and matchAll is false then we need a new message copy for all but the *last* router that may mutate the message in isMatch.
 void testMultipleRequiresCopyRouterMatchAllTrue()
          If there are multiple outbound routers and matchAll is true then we need a new message copy for all but the *last* router independent of whether the routers may mutate the message in isMatch or not.
 void testSingleDoesNotRequireCopyRouterMatchAllFalse()
          If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not .
 void testSingleDoesNotRequireCopyRouterMatchAllTrue()
          If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not .
 void testSingleRequiresCopyRouterMatchAllFalse()
          If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not .
 void testSingleRequiresCopyRouterMatchAllTrue()
          If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not .
 void testStreamPayload()
          If the message is a stream and message copying is required due to any of the scenarios tested above then an exception should be thrown as the stream payload cannot be copied.
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doTearDown, 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

DefaultOutboundRouterCollectionTestCase

public DefaultOutboundRouterCollectionTestCase()
Method Detail

doSetUp

protected 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

createService

protected Service createService()
                         throws MuleException
Throws:
MuleException

testSingleDoesNotRequireCopyRouterMatchAllFalse

public void testSingleDoesNotRequireCopyRouterMatchAllFalse()
                                                     throws Exception
If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not . The outbound phase already has a new message copy.

Throws:
Exception - if the test fails!

testSingleDoesNotRequireCopyRouterMatchAllTrue

public void testSingleDoesNotRequireCopyRouterMatchAllTrue()
                                                    throws Exception
If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not . The outbound phase already has a new message copy.

Throws:
Exception - if the test fails!

testSingleRequiresCopyRouterMatchAllFalse

public void testSingleRequiresCopyRouterMatchAllFalse()
                                               throws Exception
If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not . The outbound phase already has a new message copy.

Throws:
Exception - if the test fails!

testSingleRequiresCopyRouterMatchAllTrue

public void testSingleRequiresCopyRouterMatchAllTrue()
                                              throws Exception
If there is just one outbound router we don't need to do any copying at all regardless of if matchAll is true or not or if the router mutates the message in isMatch or not . The outbound phase already has a new message copy.

Throws:
Exception - if the test fails!

testMultipleDoesNotRequireCopyRouterMatchAllFalse

public void testMultipleDoesNotRequireCopyRouterMatchAllFalse()
                                                       throws Exception
If there are multiple outbound routers but matchAll is false then we only need to copy message if the router might mutate it in isMatch, if not then no need to copy.

Throws:
Exception - if the test fails!

testMultipleDoesNotRequireCopyRouterMatchAllTrue

public void testMultipleDoesNotRequireCopyRouterMatchAllTrue()
                                                      throws Exception
If there are multiple outbound routers and matchAll is true then we need a new message copy for all but the *last* router independent of whether the routers may mutate the message in isMatch or not. See MULE- 4352.

Throws:
Exception - if the test fails!

testMultipleRequiresCopyRouterMatchAllFalse

public void testMultipleRequiresCopyRouterMatchAllFalse()
                                                 throws Exception
If there are multiple outbound routers and matchAll is false then we need a new message copy for all but the *last* router that may mutate the message in isMatch.

Throws:
Exception - if the test fails!

testMultipleRequiresCopyRouterMatchAllTrue

public void testMultipleRequiresCopyRouterMatchAllTrue()
                                                throws Exception
If there are multiple outbound routers and matchAll is true then we need a new message copy for all but the *last* router independent of whether the routers may mutate the message in isMatch or not. See MULE- 4352.

Throws:
Exception - if the test fails!

testMultipleMixMatchAllTrue

public void testMultipleMixMatchAllTrue()
                                 throws Exception
If matchAll is true then we need a new message copy for each and every router except the last one.

Throws:
Exception - if the test fails!

testMultipleMixMatchAllFalse

public void testMultipleMixMatchAllFalse()
                                  throws Exception
If matchAll is false then we need a new message copy for each router that may mutate the message in isMatch unless it is the last router.

Throws:
Exception - if the test fails!

testStreamPayload

public void testStreamPayload()
                       throws Exception
If the message is a stream and message copying is required due to any of the scenarios tested above then an exception should be thrown as the stream payload cannot be copied.

Throws:
Exception - if the test fails!


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