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.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 MuleEvent |
runFlowNonBlocking(String flowName)
Runs the given non blocking flow with a default event
|
protected MuleEvent |
runFlowNonBlocking(String flowName,
MuleEvent event)
Runs the given non blocking flow with a default event
|
protected MuleEvent |
runFlowNonBlocking(String flowName,
Object payload)
Runs the given non blocking flow with a given payload
|
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.
|
protected void |
testFlowNonBlocking(String flowName)
Runs the given flow before ensuring all assertions defined in the flow configuration were met.
|
protected void |
testFlowNonBlocking(String flowName,
MuleEvent event)
Runs the given flow before ensuring all assertions defined in the flow configuration were met.
|
addBuilders, configureMuleContext, createMuleContext, createObject, createObject, disposeContext, disposeContextPerTest, doSetUp, doSetUpBeforeMuleContextCreation, doTearDown, doTearDownAfterMuleContextDispose, getConfigurationResources, getFileInsideWorkingDirectory, getNonBlockingResponse, getNonBlockingTestEventUsingFlow, getSensingNullMessageProcessor, getStartUpProperties, getTestConnector, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEvent, getTestEventContext, getTestEventContext, getTestEventUsingFlow, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestInboundEndpoint, getTestMuleMessage, getTestMuleMessage, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestOutboundEndpoint, getTestService, getTestService, getTestService, getTestSession, getTestTransactedInboundEndpoint, getTestTransformer, getTriggerableMessageSource, getTriggerableMessageSource, getWorkingDirectory, initialiseObject, isDisposeContextPerClass, isGracefulShutdown, isStartContext, setDisposeContextPerClass, setStartContext, setUpMuleContext
clearExcludedFlag, 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.AbstractMuleContextTestCase
Exception
protected String getConfigFile()
protected String[] getConfigFiles()
protected Object getComponent(String serviceName) throws Exception
Exception
protected Object getComponent(FlowConstruct flowConstruct) throws Exception
Exception
protected FunctionalTestComponent getFunctionalTestComponent(String serviceName) throws Exception
serviceName
- service name as declared in the configException
FunctionalTestComponent
protected FlowConstruct getFlowConstruct(String flowName) throws Exception
Exception
protected String loadResourceAsString(String resourceName) throws IOException
IOException
protected InputStream loadResource(String resourceName) throws IOException
IOException
protected void stopFlowConstruct(String flowName) throws Exception
Exception
protected void testFlow(String flowName) throws Exception
flowName
- the name of the flow to be executedException
protected 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 withException
protected void testFlowNonBlocking(String flowName) throws Exception
flowName
- the flow to testException
protected void testFlowNonBlocking(String flowName, MuleEvent event) throws Exception
flowName
- the flow to testException
protected MuleEvent runFlow(String flowName) throws Exception
flowName
- the name of the flow to be executedMuleEvent
Exception
protected MuleEvent runFlowNonBlocking(String flowName) throws Exception
flowName
- the name of the flow to be executedMuleEvent
Exception
protected MuleEvent runFlowNonBlocking(String flowName, MuleEvent event) throws Exception
flowName
- the name of the flow to be executedMuleEvent
Exception
protected MuleEvent runFlowNonBlocking(String flowName, Object payload) throws Exception
flowName
- the name of the flow to be executedpayload
- the payload to sendMuleEvent
Exception
protected <T> MuleEvent runFlow(String flowName, T payload) throws Exception
flowName
- the name of the flow to be executedpayload
- the payload to use in the messageMuleEvent
Exception
protected MuleEvent runFlow(String flowName, MuleEvent event) throws Exception
event
flowName
- the name of the flow to be executedevent
- the event which we'll use to execute the flowMuleEvent
Exception
protected <T> void runFlowAndExpect(String flowName, T expect) throws Exception
flowName
- The name of the flow to runexpect
- The expected outputException
protected <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 valueException
protected <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 eventException
protected Flow lookupFlowConstruct(String name)
name
- Name of the flow to retrieveprotected void stopFlowSchedulers(String flowName) throws MuleException
MuleException
protected SubflowInterceptingChainLifecycleWrapper getSubFlow(String subflowName)
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.