public abstract class FunctionalTestCase extends org.mule.tck.junit4.AbstractMuleContextTestCase
getBuilder() method of
this class to return the type of builder you want to use with your test.callbackCalled, CLASSNAME_ANNOTATIONS_CONFIG_BUILDER, IGNORED_DOT_MULE_DIRS, LOCK_TIMEOUT, muleContext, RECEIVE_TIMEOUT, TEST_MESSAGE, TEST_PAYLOAD, WORKING_DIRECTORY_SYSTEM_PROPERTY_KEY, workingDirectoryDEFAULT_TEST_TIMEOUT_SECS, globalTimeout, logger, name, TEST_TIMEOUT_SYSTEM_PROPERTY, TESTING_MODE_PROPERTY_NAME| Constructor and Description |
|---|
FunctionalTestCase() |
| Modifier and Type | Method and Description |
|---|---|
void |
clearFlowAssertions() |
protected ConfigurationBuilder |
getBuilder() |
protected Object |
getComponent(FlowConstruct flowConstruct)
Returns an instance of the service's component object.
|
protected Object |
getComponent(String serviceName)
Returns an instance of the service's component object.
|
protected String |
getConfigFile() |
protected String[] |
getConfigFiles() |
protected String |
getConfigResources()
Deprecated.
use getConfigFile instead.
|
protected FlowConstruct |
getFlowConstruct(String flowName) |
protected FunctionalTestComponent |
getFunctionalTestComponent(String serviceName)
A convenience method to get a type-safe reference to the FunctionTestComponent
|
protected SubflowInterceptingChainLifecycleWrapper |
getSubFlow(String subflowName) |
protected InputStream |
loadResource(String resourceName) |
protected String |
loadResourceAsString(String resourceName) |
protected Flow |
lookupFlowConstruct(String name)
Retrieve a flow by name from the registry
|
protected MuleEvent |
runFlow(String flowName)
Runs the given flow with a default event
|
protected MuleEvent |
runFlow(String flowName,
MuleEvent event)
Executes the given flow with the given
event |
protected <T> MuleEvent |
runFlow(String flowName,
T payload)
Executes the given flow with a default message carrying the payload
|
protected <T> void |
runFlowAndExpect(String flowName,
T expect)
Run the flow specified by name and assert equality on the expected output
|
protected <T> void |
runFlowAndExpectProperty(String flowName,
String propertyName,
T expect)
Runs the given flow and asserts for property name in the outbound scope to
match the expected value
|
protected <T,U> void |
runFlowWithPayloadAndExpect(String flowName,
T expect,
U payload)
Run the flow specified by name using the specified payload and assert equality
on the expected output
|
protected void |
runSchedulersOnce(String flowConstructName) |
protected void |
stopFlowConstruct(String flowName) |
protected void |
stopFlowSchedulers(String flowName) |
protected void |
testFlow(String flowName)
Tests the given flow with a one-way message exchange pattern
|
protected void |
testFlow(String flowName,
MuleEvent event)
Looks up the given flow in the registry and processes it with the given event.
|
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, doSetUpBeforeMuleContextCreation, doTearDown, doTearDownAfterMuleContextDispose, getConfigurationResources, getFileInsideWorkingDirectory, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestMuleMessage, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, getWorkingDirectory, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContextclearExcludedFlag, clearRequestContext, clearTestCaseName, createTestTimeoutRule, dumpFilteredThreadsInTest, getTestHeader, getTestTimeoutSecs, getTimeoutSystemProperty, initializeMuleTest, isDisabledInThisEnvironment, isDisabledInThisEnvironment, isExcluded, isFailOnTimeout, isOffline, isTestIncludedInExclusionFile, takeTestCaseName@Deprecated protected String getConfigResources()
protected ConfigurationBuilder getBuilder() throws Exception
getBuilder in class org.mule.tck.junit4.AbstractMuleContextTestCaseExceptionprotected String getConfigFile()
protected String[] getConfigFiles()
protected Object getComponent(String serviceName) throws Exception
Exceptionprotected Object getComponent(FlowConstruct flowConstruct) throws Exception
Exceptionprotected FunctionalTestComponent getFunctionalTestComponent(String serviceName) throws Exception
serviceName - service name as declared in the configExceptionFunctionalTestComponentprotected FlowConstruct getFlowConstruct(String flowName) throws Exception
Exceptionprotected String loadResourceAsString(String resourceName) throws IOException
IOExceptionprotected InputStream loadResource(String resourceName) throws IOException
IOExceptionprotected void stopFlowConstruct(String flowName) throws Exception
Exceptionprotected void testFlow(String flowName) throws Exception
flowName - the name of the flow to be executedExceptionprotected void testFlow(String flowName, MuleEvent event) throws Exception
org.mule.tck.functional.FlowAssert.verify(String)flowName - the name of the flow to be executedevent - the event ot execute withExceptionprotected MuleEvent runFlow(String flowName) throws Exception
flowName - the name of the flow to be executedMuleEventExceptionprotected <T> MuleEvent runFlow(String flowName, T payload) throws Exception
flowName - the name of the flow to be executedpayload - the payload to use in the messageMuleEventExceptionprotected MuleEvent runFlow(String flowName, MuleEvent event) throws Exception
eventflowName - the name of the flow to be executedevent - the event which we'll use to execute the flowMuleEventExceptionprotected <T> void runFlowAndExpect(String flowName, T expect) throws Exception
flowName - The name of the flow to runexpect - The expected outputExceptionprotected <T> void runFlowAndExpectProperty(String flowName, String propertyName, T expect) throws Exception
flowName - the name of the flow to be executedpropertyName - the name of the property to testexpect - the expected valueExceptionprotected <T,U> void runFlowWithPayloadAndExpect(String flowName, T expect, U payload) throws Exception
flowName - The name of the flow to runexpect - The expected outputpayload - The payload of the input eventExceptionprotected Flow lookupFlowConstruct(String name)
name - Name of the flow to retrieveprotected void stopFlowSchedulers(String flowName) throws MuleException
MuleExceptionprotected SubflowInterceptingChainLifecycleWrapper getSubFlow(String subflowName)
Copyright © 2003–2015 MuleSoft, Inc.. All rights reserved.