[jboss-cvs] jboss-seam/src/main/org/jboss/seam/mock ...
Gavin King
gavin.king at jboss.com
Wed Jun 20 04:23:18 EDT 2007
User: gavin
Date: 07/06/20 04:23:18
Modified: src/main/org/jboss/seam/mock BaseSeamTest.java
Log:
split up Lifecycle, much better
Revision Changes Path
1.18 +10 -7 jboss-seam/src/main/org/jboss/seam/mock/BaseSeamTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: BaseSeamTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/mock/BaseSeamTest.java,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -b -r1.17 -r1.18
--- BaseSeamTest.java 20 Jun 2007 05:34:32 -0000 1.17
+++ BaseSeamTest.java 20 Jun 2007 08:23:18 -0000 1.18
@@ -30,7 +30,9 @@
import org.jboss.seam.Component;
import org.jboss.seam.Model;
import org.jboss.seam.contexts.Contexts;
-import org.jboss.seam.contexts.Lifecycle;
+import org.jboss.seam.contexts.FacesLifecycle;
+import org.jboss.seam.contexts.ServletLifecycle;
+import org.jboss.seam.contexts.TestLifecycle;
import org.jboss.seam.core.Expressions;
import org.jboss.seam.core.Init;
import org.jboss.seam.core.Manager;
@@ -147,14 +149,14 @@
public void run() throws Exception
{
- Lifecycle.beginTest( servletContext, new ServletSessionMap(session) );
+ TestLifecycle.beginTest( servletContext, new ServletSessionMap(session) );
try
{
testComponents();
}
finally
{
- Lifecycle.endTest();
+ TestLifecycle.endTest();
}
}
}
@@ -491,7 +493,7 @@
{
if (Contexts.isEventContextActive())
{
- Lifecycle.endRequest(externalContext);
+ FacesLifecycle.endRequest(externalContext);
}
}
@@ -832,11 +834,12 @@
public void begin()
{
session = new MockHttpSession(servletContext);
+ ServletLifecycle.beginSession(session);
}
public void end()
{
- Lifecycle.endSession( servletContext, new ServletSessionMap(session) );
+ ServletLifecycle.endSession(session);
session = null;
}
@@ -849,7 +852,7 @@
servletContext = new MockServletContext();
initServletContext( servletContext.getInitParameters() );
- Lifecycle.setServletContext(servletContext);
+ ServletLifecycle.beginApplication(servletContext);
new Initialization(servletContext).create().init();
conversationViewRootAttributes = new HashMap<String, Map>();
@@ -857,7 +860,7 @@
public void cleanup() throws Exception
{
- Lifecycle.endApplication(servletContext);
+ ServletLifecycle.endApplication();
conversationViewRootAttributes = null;
}
More information about the jboss-cvs-commits
mailing list