From 1d2f0e638ab34b92a014aaae39c468806eca18d9 Mon Sep 17 00:00:00 2001 From: Ben Hale Date: Thu, 14 Jun 2007 02:25:02 +0000 Subject: [PATCH] Ensures that all exceptions (including RuntimeExceptions) are handled properly by the FlowExcution (SWF-333) --- .../webflow/engine/impl/MiscFlowExecutionTests.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/MiscFlowExecutionTests.java b/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/MiscFlowExecutionTests.java index 8125095f..37955844 100644 --- a/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/MiscFlowExecutionTests.java +++ b/spring-webflow/src/test/java/org/springframework/webflow/engine/impl/MiscFlowExecutionTests.java @@ -30,6 +30,7 @@ import org.springframework.webflow.engine.builder.xml.XmlFlowBuilder; import org.springframework.webflow.engine.support.ApplicationViewSelector; import org.springframework.webflow.execution.Event; import org.springframework.webflow.execution.FlowExecution; +import org.springframework.webflow.execution.FlowExecutionException; import org.springframework.webflow.execution.RequestContext; import org.springframework.webflow.execution.support.ApplicationView; import org.springframework.webflow.test.MockExternalContext; @@ -75,8 +76,10 @@ public class MiscFlowExecutionTests extends TestCase { FlowExecutionImpl execution = new FlowExecutionImpl(flow); try { execution.start(null, new MockExternalContext()); - } catch (RequiredMappingException e) { - + fail("Should have thrown a FlowExecutionException"); + } catch (FlowExecutionException e) { + assertTrue("Root cause should have been a RequiredMappingException", + e.getRootCause() instanceof RequiredMappingException); } }