org.mule.modules.tests
Class TestParent

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.modules.tests.TestParent

public abstract class TestParent
extends org.mule.tck.junit4.FunctionalTestCase

Connector Tests Framework Parent Class

Author:
Mulesoft, Inc

Field Summary
protected static org.springframework.context.ApplicationContext context
           
protected static String[] SPRING_CONFIG_FILES
           
 
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
TestParent()
           
 
Method Summary
protected  void addToMessageTestObject(Map testObject)
          Adds a complete map to the message test object
protected  void addToMessageTestObject(String key, Object value)
          Adds a value to the message test object
static void beforeClass()
           
protected  String getConfigResources()
           
protected  String getConfigXmlFile()
          Allows the user to override the default xml file
protected
<T> T
getValueFromMessageTestObject(String key)
          Retrieves a value from the message test object using the given key
protected  org.mule.construct.Flow lookupFlowConstruct(String name)
          Retrieve a flow by name from the registry
protected
<T> T
runFlowAndGetPayload(String flowName)
          Runs a flow using messageTestObject as payload.
 
Methods inherited from class org.mule.tck.junit4.FunctionalTestCase
clearFlowAssertions, getBuilder, getComponent, getComponent, getFlowConstruct, getFunctionalTestComponent, loadResource, loadResourceAsString, stopFlowConstruct, testFlow, testFlow
 
Methods inherited from class org.mule.tck.junit4.AbstractMuleContextTestCase
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, doTearDown, 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
 

Field Detail

SPRING_CONFIG_FILES

protected static final String[] SPRING_CONFIG_FILES

context

protected static org.springframework.context.ApplicationContext context
Constructor Detail

TestParent

public TestParent()
Method Detail

beforeClass

public static void beforeClass()

getConfigResources

protected String getConfigResources()
Specified by:
getConfigResources in class org.mule.tck.junit4.FunctionalTestCase

getConfigXmlFile

protected String getConfigXmlFile()
Allows the user to override the default xml file

Returns:
Mule xml config file

runFlowAndGetPayload

protected <T> T runFlowAndGetPayload(String flowName)
                          throws Exception
Runs a flow using messageTestObject as payload. If something fails it throws the actual exception and not the Mule MessagingException wrapper

Parameters:
flowName - name of the flow to run
Returns:
message payload
Throws:
Exception

addToMessageTestObject

protected void addToMessageTestObject(String key,
                                      Object value)
Adds a value to the message test object

Parameters:
key - key
value - value

addToMessageTestObject

protected void addToMessageTestObject(Map testObject)
Adds a complete map to the message test object

Parameters:
testObject - map to be added to the Message test object

getValueFromMessageTestObject

protected <T> T getValueFromMessageTestObject(String key)
Retrieves a value from the message test object using the given key

Parameters:
key - key
Returns:
value from Message test object

lookupFlowConstruct

protected org.mule.construct.Flow lookupFlowConstruct(String name)
Retrieve a flow by name from the registry

Parameters:
name - Name of the flow to retrieve


Copyright © 2013. All rights reserved.