org.mule.transport.jms.integration
Class AbstractJmsSingleTransactionSingleServiceTestCase

java.lang.Object
  extended by org.mule.tck.junit4.AbstractMuleTestCase
      extended by org.mule.tck.junit4.AbstractMuleContextTestCase
          extended by org.mule.tck.junit4.FunctionalTestCase
              extended by org.mule.transport.jms.integration.AbstractJmsFunctionalTestCase
                  extended by org.mule.transport.jms.integration.AbstractJmsSingleTransactionSingleServiceTestCase
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
 
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.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, name, TEST_TIMEOUT_SYSTEM_PROPERTY
 
Constructor Summary
AbstractJmsSingleTransactionSingleServiceTestCase()
           
 
Method Summary
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().
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
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
 
Methods inherited from class org.mule.tck.junit4.FunctionalTestCase
clearFlowAssertions, getComponent, getComponent, getConfigResources, getFlowConstruct, getFunctionalTestComponent, loadResource, loadResourceAsString, stopFlowConstruct, testFlow, testFlow
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, getConfigurationResources, getSensingNullMessageProcessor, 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
 

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: 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 AbstractJmsFunctionalTestCase
Throws:
Exception - if something fails that should halt the test case

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-2012 MuleSoft, Inc.. All Rights Reserved.