|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.springframework.webflow.test.execution.AbstractFlowExecutionTests
org.springframework.webflow.test.execution.AbstractExternalizedFlowExecutionTests
public abstract class AbstractExternalizedFlowExecutionTests
Base class for flow integration tests that verify an externalized flow definition executes as expected. Supports caching of the flow definition built from an externalized resource to speed up test execution.
Constructor Summary | |
---|---|
AbstractExternalizedFlowExecutionTests()
Constructs a default externalized flow execution test. |
|
AbstractExternalizedFlowExecutionTests(java.lang.String name)
Constructs an externalized flow execution test with given name. |
Method Summary | |
---|---|
protected Flow |
buildFlow()
Factory method to assemble a flow definition from a resource. |
protected void |
configure(MockFlowBuilderContext builderContext)
Subclasses may override this hook to customize the builder context for the flow being tested. |
protected abstract FlowBuilder |
createFlowBuilder(org.springframework.core.io.Resource path)
Create the flow builder to build the flow at the specified resource location. |
protected FlowBuilderContext |
createFlowBuilderContext(FlowDefinitionResource resource)
Create the flow builder context to build the flow definition at the resource location provided. |
protected FlowDefinition |
getFlowDefinition()
Returns the flow definition being tested. |
protected abstract FlowDefinitionResource |
getResource(FlowDefinitionResourceFactory resourceFactory)
Get the flow definition to be tested. |
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. |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
Methods inherited from class junit.framework.Assert |
---|
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractExternalizedFlowExecutionTests()
TestCase.setName(String)
public AbstractExternalizedFlowExecutionTests(java.lang.String name)
name
- the name of the testMethod Detail |
---|
protected 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 final FlowDefinition getFlowDefinition()
getFlowDefinition
in class AbstractFlowExecutionTests
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 FlowBuilderContext createFlowBuilderContext(FlowDefinitionResource resource)
resource
- the flow definition resource
protected void configure(MockFlowBuilderContext builderContext)
builderContext
- the mock flow builder context.protected abstract FlowDefinitionResource getResource(FlowDefinitionResourceFactory resourceFactory)
a
- helper for constructing the resource to be tested
protected abstract FlowBuilder createFlowBuilder(org.springframework.core.io.Resource path)
path
- the location of the flow definition
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |