diff --git a/spring-webflow/changelog.txt b/spring-webflow/changelog.txt index 0570ae1f..80170f3b 100644 --- a/spring-webflow/changelog.txt +++ b/spring-webflow/changelog.txt @@ -50,6 +50,9 @@ Package org.springframework.webflow.executor Package org.springframework.webflow.support * Added native support for Hibernate's session-per-conversation pattern (SWF-92). +Package org.springframework.webflow.test +* Added the ability to apply multiple listeners to a test case (SWF-334). + Changes in version 1.0.3 (24.04.2007) ------------------------------------- diff --git a/spring-webflow/src/main/java/org/springframework/webflow/test/execution/AbstractExternalizedFlowExecutionTests.java b/spring-webflow/src/main/java/org/springframework/webflow/test/execution/AbstractExternalizedFlowExecutionTests.java index 7824135d..6e5d88ed 100644 --- a/spring-webflow/src/main/java/org/springframework/webflow/test/execution/AbstractExternalizedFlowExecutionTests.java +++ b/spring-webflow/src/main/java/org/springframework/webflow/test/execution/AbstractExternalizedFlowExecutionTests.java @@ -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) {