Author: pete.muir(a)jboss.org
Date: 2008-07-31 11:28:35 -0400 (Thu, 31 Jul 2008)
New Revision: 8551
Modified:
trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java
Log:
JBSEAM-2860
Modified: trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java
===================================================================
--- trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java 2008-07-31 15:19:10 UTC (rev
8550)
+++ trunk/src/main/org/jboss/seam/mock/AbstractSeamTest.java 2008-07-31 15:28:35 UTC (rev
8551)
@@ -24,6 +24,7 @@
import javax.naming.NamingException;
import javax.servlet.Filter;
import javax.servlet.FilterChain;
+import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
@@ -71,7 +72,7 @@
{
private Application application;
- private MockServletContext servletContext;
+ private ServletContext servletContext;
private static SeamPhaseListener phases;
private MockHttpSession session;
private Map<String, Map> conversationViewRootAttributes;
@@ -911,13 +912,19 @@
protected void startSeam() throws Exception
{
startJbossEmbeddedIfNecessary();
- servletContext = new MockServletContext();
- initServletContext(servletContext.getInitParameters());
+ this.servletContext = createServletContext();
ServletLifecycle.beginApplication(servletContext);
new Initialization(servletContext).create().init();
((Init)
servletContext.getAttribute(Seam.getComponentName(Init.class))).setDebug(false);
}
+ protected ServletContext createServletContext()
+ {
+ MockServletContext mockServletContext = new MockServletContext();
+ initServletContext(mockServletContext.getInitParameters());
+ return mockServletContext;
+ }
+
/**
* Shutdown Seam. Can be used at class, test group or suite level (e.g
* @AfterClass, @AfterTest, @AfterSuite)
Show replies by date