org.mule.transport.jms.integration
Class AbstractJmsSingleTransactionSingleServiceTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.mule.tck.AbstractMuleTestCase
              extended by org.mule.tck.FunctionalTestCase
                  extended by org.mule.transport.jms.integration.AbstractJmsFunctionalTestCase
                      extended by org.mule.transport.jms.integration.AbstractJmsSingleTransactionSingleServiceTestCase
All Implemented Interfaces:
junit.framework.Test, TestCaseWatchdogTimeoutHandler
Direct Known Subclasses:
JmsSingleTransactionSingleServiceAlwaysBeginConfigurationTestCase, JmsSingleTransactionSingleServiceAlwaysJoinConfigurationTestCase, JmsSingleTransactionSingleServiceBeginOrJoinConfigurationTestCase, JmsSingleTransactionSingleServiceJoinIfPossibleConfigurationTestCase, JmsSingleTransactionSingleServiceNoneConfigurationTestCase

public abstract class AbstractJmsSingleTransactionSingleServiceTestCase
extends AbstractJmsFunctionalTestCase

This tests single resource transactions through a single service definition (even though the mule config file will have many service definitions). The idea is to test all possible combinations of single resource transaction types.

Author:
dzapata

Nested Class Summary
 
Nested classes/interfaces inherited from class org.mule.transport.jms.integration.AbstractJmsFunctionalTestCase
AbstractJmsFunctionalTestCase.AbstractScenario, AbstractJmsFunctionalTestCase.NonTransactedScenario, AbstractJmsFunctionalTestCase.Scenario, AbstractJmsFunctionalTestCase.ScenarioCommit, AbstractJmsFunctionalTestCase.ScenarioNotReceive, AbstractJmsFunctionalTestCase.ScenarioReceive, AbstractJmsFunctionalTestCase.ScenarioRollback
 
Nested classes/interfaces inherited from class org.mule.tck.AbstractMuleTestCase
AbstractMuleTestCase.TestInfo
 
Field Summary
static String JMS_QUEUE_INPUT_CONF_A
           
static String JMS_QUEUE_INPUT_CONF_B
           
static String JMS_QUEUE_INPUT_CONF_C
           
static String JMS_QUEUE_INPUT_CONF_D
           
static String JMS_QUEUE_INPUT_CONF_E
           
static String JMS_QUEUE_OUTPUT_CONF_A
           
static String JMS_QUEUE_OUTPUT_CONF_B
           
static String JMS_QUEUE_OUTPUT_CONF_C
           
static String JMS_QUEUE_OUTPUT_CONF_D
           
static String JMS_QUEUE_OUTPUT_CONF_E
           
 
Fields inherited from class org.mule.transport.jms.integration.AbstractJmsFunctionalTestCase
BROADCAST_TOPIC_ENDPOINT_KEY, DEFAULT_INPUT_MESSAGE, DEFAULT_OUTPUT_MESSAGE, INBOUND_ENDPOINT_KEY, jmsConfig, logger, MIDDLE_ENDPOINT_KEY, MIDDLE2_ENDPOINT_KEY, MIDDLE3_ENDPOINT_KEY, OUTBOUND_ENDPOINT_KEY, purgeQueuesOnPreSetUp, purgeQueuesOnTearDown, scenarioCommit, scenarioNotReceive, scenarioNoTx, scenarioReceive, scenarioRollback
 
Fields inherited from class org.mule.tck.AbstractMuleTestCase
callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, DEFAULT_MULE_TEST_TIMEOUT_SECS, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, numPorts, ports, PROPERTY_MULE_TEST_TIMEOUT, RECEIVE_TIMEOUT, TEST_MESSAGE, testTimeoutSecs
 
Constructor Summary
AbstractJmsSingleTransactionSingleServiceTestCase()
           
 
Method Summary
protected  void doSetUp()
          Exactly the same a AbstractMuleTestCase.setUp() in normal JUnit test cases.
protected  Properties getStartUpProperties()
          Adds the following properties to the registry so that the Xml configuration files can reference them.
protected  void runTransactionFail(String serviceName)
          Call this when you expect the transaction to fail
protected  void runTransactionPass()
          Call this when you expect the message to make it to the outbound endpoint
 void testAlwaysBegin()
           
 void testAlwaysJoin()
           
 void testBeginOrJoin()
           
 void testJoinIfPossible()
           
 void testNone()
           
 
Methods inherited from class org.mule.transport.jms.integration.AbstractJmsFunctionalTestCase
after, before, checkConfig, createInputDestination, createJmsConfig, createOutputDestination, dispatchMessage, dispatchMessage, dispatchMessage, doTearDown, getBuilder, getClient, getConnection, getDeadLetterQueueName, getInboundEndpoint, getInboundQueueName, getJmsConfig, getOutboundEndpoint, getOutboundQueueName, getSmallTimeout, getTimeout, isMultipleProviders, jmsProviderConfigs, purge, purgeTopic, purgeTopics, receive, receiveMessage, receiveMessage, receiveMessage, runAsynchronousDispatching, send, setJmsConfig, setMultipleProviders, suitePreSetUp
 
Methods inherited from class org.mule.tck.FunctionalTestCase
getComponent, getComponent, getConfigResources, getFunctionalTestComponent, loadResource, loadResourceAsString
 
Methods inherited from class org.mule.tck.AbstractMuleTestCase
addBuilders, checkPorts, configureMuleContext, createMuleContext, createObject, createObject, createTestInfo, createWatchdog, disposeManager, findFreePorts, getConfigurationResources, getPorts, getSensingNullMessageProcessor, 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, 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
 

Field Detail

JMS_QUEUE_INPUT_CONF_A

public static final String JMS_QUEUE_INPUT_CONF_A
See Also:
Constant Field Values

JMS_QUEUE_OUTPUT_CONF_A

public static final String JMS_QUEUE_OUTPUT_CONF_A
See Also:
Constant Field Values

JMS_QUEUE_INPUT_CONF_B

public static final String JMS_QUEUE_INPUT_CONF_B
See Also:
Constant Field Values

JMS_QUEUE_OUTPUT_CONF_B

public static final String JMS_QUEUE_OUTPUT_CONF_B
See Also:
Constant Field Values

JMS_QUEUE_INPUT_CONF_C

public static final String JMS_QUEUE_INPUT_CONF_C
See Also:
Constant Field Values

JMS_QUEUE_OUTPUT_CONF_C

public static final String JMS_QUEUE_OUTPUT_CONF_C
See Also:
Constant Field Values

JMS_QUEUE_INPUT_CONF_D

public static final String JMS_QUEUE_INPUT_CONF_D
See Also:
Constant Field Values

JMS_QUEUE_OUTPUT_CONF_D

public static final String JMS_QUEUE_OUTPUT_CONF_D
See Also:
Constant Field Values

JMS_QUEUE_INPUT_CONF_E

public static final String JMS_QUEUE_INPUT_CONF_E
See Also:
Constant Field Values

JMS_QUEUE_OUTPUT_CONF_E

public static final String JMS_QUEUE_OUTPUT_CONF_E
See Also:
Constant Field Values
Constructor Detail

AbstractJmsSingleTransactionSingleServiceTestCase

public AbstractJmsSingleTransactionSingleServiceTestCase()
Method Detail

doSetUp

protected void doSetUp()
                throws 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 AbstractJmsFunctionalTestCase
Throws:
Exception - if something fails that should halt the testcase

getStartUpProperties

protected Properties getStartUpProperties()
Description copied from class: AbstractJmsFunctionalTestCase
Adds the following properties to the registry so that the Xml configuration files can reference them.

Overrides:
getStartUpProperties in class AbstractJmsFunctionalTestCase

testNone

public void testNone()
              throws Exception
Throws:
Exception

testAlwaysBegin

public void testAlwaysBegin()
                     throws Exception
Throws:
Exception

testBeginOrJoin

public void testBeginOrJoin()
                     throws Exception
Throws:
Exception

testAlwaysJoin

public void testAlwaysJoin()
                    throws Exception
Throws:
Exception

testJoinIfPossible

public void testJoinIfPossible()
                        throws Exception
Throws:
Exception

runTransactionFail

protected void runTransactionFail(String serviceName)
                           throws Exception
Call this when you expect the transaction to fail

Parameters:
serviceName -
Throws:
Exception

runTransactionPass

protected void runTransactionPass()
                           throws Exception
Call this when you expect the message to make it to the outbound endpoint

Throws:
Exception


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