public abstract class AbstractExternalizedFlowExecutionTests extends AbstractFlowExecutionTests
Constructor and Description |
---|
AbstractExternalizedFlowExecutionTests()
Constructs a default externalized flow execution test.
|
AbstractExternalizedFlowExecutionTests(java.lang.String name)
Constructs an externalized flow execution test with given name.
|
Modifier and Type | Method and Description |
---|---|
protected Flow |
buildFlow()
Factory method to assemble a flow definition from a resource.
|
protected void |
configureFlowBuilderContext(MockFlowBuilderContext builderContext)
Subclasses may override this hook to customize the builder context for the flow being tested.
|
protected abstract FlowBuilder |
createFlowBuilder(FlowDefinitionResource resource)
Create the flow builder to build the flow at the specified resource location.
|
protected org.springframework.core.io.ResourceLoader |
createResourceLoader()
Returns the
ResourceLoader used by the FlowDefinitionResourceFactory to load flow resources from
a path. |
protected Flow |
getFlow()
Returns the flow definition being tested as a
Flow implementation. |
protected FlowDefinition |
getFlowDefinition()
Returns the flow definition to be tested.
|
protected FlowDefinitionRegistry |
getFlowDefinitionRegistry()
Returns a reference to the flow definition registry used by the flow being tested to load subflows.
|
protected abstract FlowDefinitionResource |
getResource(FlowDefinitionResourceFactory resourceFactory)
Get the resource defining the flow to be tested.
|
protected FlowDefinitionResourceFactory |
getResourceFactory()
Returns the factory used to create pointers to externalized flow definition resources.
|
protected boolean |
isCacheFlowDefinition()
Returns if flow definition caching is turned on.
|
protected void |
setCacheFlowDefinition(boolean cacheFlowDefinition)
Sets the flag indicating if the flow definition built from an externalized resource as part of this test should
be cached.
|
protected void |
setFlowExecutionAttributes(AttributeMap executionAttributes)
Sets system attributes to be associated with the flow execution the next time one is started.
|
protected void |
setFlowExecutionListener(FlowExecutionListener executionListener)
Set a single listener to be attached to the flow execution the next time one is started by this test.
|
protected void |
setFlowExecutionListeners(FlowExecutionListener[] executionListeners)
Set the listeners to be attached to the flow execution the next time one is started.
|
assertActiveFlowEquals, assertCurrentStateEquals, assertFlowExecutionActive, assertFlowExecutionEnded, assertFlowExecutionOutcomeEquals, assertResponseWrittenEquals, createFlowExecutionFactory, getConversationAttribute, getConversationScope, getFlowAttribute, getFlowExecution, getFlowExecutionFactory, getFlowExecutionOutcome, getFlowScope, getRequiredConversationAttribute, getRequiredConversationAttribute, getRequiredFlowAttribute, getRequiredFlowAttribute, getRequiredViewAttribute, getRequiredViewAttribute, getViewAttribute, getViewScope, resumeFlow, setCurrentState, startFlow, startFlow, updateFlowExecution
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString
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
public AbstractExternalizedFlowExecutionTests()
TestCase.setName(String)
public AbstractExternalizedFlowExecutionTests(java.lang.String name)
name
- the name of the testprotected boolean isCacheFlowDefinition()
protected void setCacheFlowDefinition(boolean cacheFlowDefinition)
protected void setFlowExecutionAttributes(AttributeMap executionAttributes)
executionAttributes
- the system attributes to assignprotected void setFlowExecutionListener(FlowExecutionListener executionListener)
executionListener
- the listener to attachprotected void setFlowExecutionListeners(FlowExecutionListener[] executionListeners)
executionListeners
- the listeners to attachprotected FlowDefinitionResourceFactory getResourceFactory()
protected org.springframework.core.io.ResourceLoader createResourceLoader()
ResourceLoader
used by the FlowDefinitionResourceFactory
to load flow resources from
a path. Subclasses may override to customize the resource loader used.getResourceFactory()
protected final FlowDefinition getFlowDefinition()
AbstractFlowExecutionTests
getFlowDefinition
in class AbstractFlowExecutionTests
protected final Flow getFlow()
Flow
implementation. Useful if you need to do specific
assertions against the configuration of the implementation.protected final Flow buildFlow()
getFlowDefinition()
to create
the "main" flow to test. May also be called by subclasses to create subflow definitions whose executions should
also be exercised by this test.protected void configureFlowBuilderContext(MockFlowBuilderContext builderContext)
flow builder services
. By default, this method
does nothing.builderContext
- the mock flow builder context to configureprotected FlowDefinitionRegistry getFlowDefinitionRegistry()
configureFlowBuilderContext(MockFlowBuilderContext)
.protected abstract FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory)
resourceFactory
- a helper for constructing the resource to be testedprotected abstract FlowBuilder createFlowBuilder(FlowDefinitionResource resource)
resource
- the resource location of the flow definition