org.mule.routing.outbound
Class DefaultOutboundRouterCollectionTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.routing.outbound.DefaultOutboundRouterCollectionTestCase
All Implemented Interfaces:
junit.framework.Test, TestCaseWatchdogTimeoutHandler

public class DefaultOutboundRouterCollectionTestCase
extends AbstractMuleTestCase


Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
AbstractMuleTestCase.TestInfo
 
Field Summary
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, DEFAULT_MULE_TEST_TIMEOUT_SECS, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, logger, muleContext, numPorts, ports, PROPERTY_MULE_TEST_TIMEOUT, RECEIVE_TIMEOUT, TEST_MESSAGE, testTimeoutSecs
 
Constructor Summary
DefaultOutboundRouterCollectionTestCase()
           
 
Method Summary
protected  Service createService()
           
protected  void doSetUp()
          Exactly the same a AbstractMuleTestCase.setUp() in normal JUnit test cases.
 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.AbstractMuleTestCase
addBuilders, checkPorts, configureMuleContext, createMuleContext, createObject, createObject, createTestInfo, createWatchdog, disposeManager, doTearDown, findFreePorts, getBuilder, getConfigurationResources, getPorts, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEvent, getTestInboundEvent, getTestInboundEvent, getTestInfo, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTimeoutSecs, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, giveTheTestSomeTimeToCleanUpAndThenKillIt, handleTimeout, initialiseObject, initTestTimeoutSecs, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isDisposeManagerPerSuite, isExcluded, isGracefulShutdown, isOffline, isPortFree, isStartContext, registerTestMethod, run, runBare, setDisposeManagerPerSuite, setFailOnTimeout, setName, setStartContext, setUp, suitePostTearDown, suitePreSetUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, 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, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DefaultOutboundRouterCollectionTestCase

public DefaultOutboundRouterCollectionTestCase()
Method Detail

doSetUp

protected void doSetUp()
                throws java.lang.Exception
Description copied from class: AbstractMuleTestCase
Exactly the same a AbstractMuleTestCase.setUp() in normal JUnit test cases. this is called before a test method has been called.

Overrides:
doSetUp in class AbstractMuleTestCase
Throws:
java.lang.Exception - if something fails that should halt the testcase

createService

protected Service createService()
                         throws MuleException
Throws:
MuleException

testSingleDoesNotRequireCopyRouterMatchAllFalse

public void testSingleDoesNotRequireCopyRouterMatchAllFalse()
                                                     throws java.lang.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:
java.lang.Exception - if the test fails!

testSingleDoesNotRequireCopyRouterMatchAllTrue

public void testSingleDoesNotRequireCopyRouterMatchAllTrue()
                                                    throws java.lang.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:
java.lang.Exception - if the test fails!

testSingleRequiresCopyRouterMatchAllFalse

public void testSingleRequiresCopyRouterMatchAllFalse()
                                               throws java.lang.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:
java.lang.Exception - if the test fails!

testSingleRequiresCopyRouterMatchAllTrue

public void testSingleRequiresCopyRouterMatchAllTrue()
                                              throws java.lang.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:
java.lang.Exception - if the test fails!

testMultipleDoesNotRequireCopyRouterMatchAllFalse

public void testMultipleDoesNotRequireCopyRouterMatchAllFalse()
                                                       throws java.lang.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:
java.lang.Exception - if the test fails!

testMultipleDoesNotRequireCopyRouterMatchAllTrue

public void testMultipleDoesNotRequireCopyRouterMatchAllTrue()
                                                      throws java.lang.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:
java.lang.Exception - if the test fails!

testMultipleRequiresCopyRouterMatchAllFalse

public void testMultipleRequiresCopyRouterMatchAllFalse()
                                                 throws java.lang.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:
java.lang.Exception - if the test fails!

testMultipleRequiresCopyRouterMatchAllTrue

public void testMultipleRequiresCopyRouterMatchAllTrue()
                                                throws java.lang.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:
java.lang.Exception - if the test fails!

testMultipleMixMatchAllTrue

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

Throws:
java.lang.Exception - if the test fails!

testMultipleMixMatchAllFalse

public void testMultipleMixMatchAllFalse()
                                  throws java.lang.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:
java.lang.Exception - if the test fails!

testStreamPayload

public void testStreamPayload()
                       throws java.lang.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:
java.lang.Exception - if the test fails!


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