Added the ability to apply multiple listeners to a test case (SWF-334)

This commit is contained in:
Ben Hale
2007-06-12 20:35:10 +00:00
parent f5d9813d78
commit 3fbabf2b90
2 changed files with 14 additions and 0 deletions

View File

@@ -37,6 +37,9 @@ Package org.springframework.webflow.executor
* JSF can now use a FlowSystemCleanupFilter to ensure that no matter what happens in JSF, the request context
is cleaned up properly (SWF-306).
Package org.springframework.webflow.test
* Added the ability to apply multiple listeners to a test case (SWF-334).
Changes in version 1.0.3 (19.04.2007)
-------------------------------------

View File

@@ -112,6 +112,17 @@ public abstract class AbstractExternalizedFlowExecutionTests extends AbstractFlo
getFlowExecutionImplFactory().setExecutionListenerLoader(
new StaticFlowExecutionListenerLoader(executionListener));
}
/**
* Set the listeners to be attached to the flow execution the next time one
* is {@link #startFlow() started} by this test. Useful for attaching
* listeners that do test assertions during the execution of the flow.
* @param executionListeners the listeners to attach
*/
protected void setFlowExecutionListeners(FlowExecutionListener[] executionListeners) {
getFlowExecutionImplFactory().setExecutionListenerLoader(
new StaticFlowExecutionListenerLoader(executionListeners));
}
protected final FlowDefinition getFlowDefinition() {
if (isCacheFlowDefinition() && cachedFlowDefinition != null) {