From a89f24d95475cc9dbbec84d66a2ceeb3256fe97f Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Wed, 15 Sep 2010 08:47:46 +0000 Subject: [PATCH] Fix test setup issue --- .../faces/webflow/JsfFlowHandlerAdapterTests.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFlowHandlerAdapterTests.java b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFlowHandlerAdapterTests.java index 0047bb1b..540cfe51 100644 --- a/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFlowHandlerAdapterTests.java +++ b/spring-faces/src/test/java/org/springframework/faces/webflow/JsfFlowHandlerAdapterTests.java @@ -4,6 +4,8 @@ import junit.framework.TestCase; import org.springframework.js.ajax.AjaxHandler; import org.springframework.js.ajax.SpringJavascriptAjaxHandler; +import org.springframework.mock.web.MockServletContext; +import org.springframework.web.context.support.StaticWebApplicationContext; import org.springframework.webflow.context.ExternalContext; import org.springframework.webflow.core.FlowException; import org.springframework.webflow.core.collection.MutableAttributeMap; @@ -15,7 +17,10 @@ public class JsfFlowHandlerAdapterTests extends TestCase { private JsfFlowHandlerAdapter handlerAdapter; protected void setUp() throws Exception { + StaticWebApplicationContext context = new StaticWebApplicationContext(); + context.setServletContext(new MockServletContext()); handlerAdapter = new JsfFlowHandlerAdapter(); + handlerAdapter.setApplicationContext(context); handlerAdapter.setFlowExecutor(new StubFlowExecutor()); }