Author: dan.j.allen
Date: 2008-09-20 17:33:28 -0400 (Sat, 20 Sep 2008)
New Revision: 9046
Modified:
branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java
Log:
oops, needed to initialize the JSF Application before starting Seam
Modified: branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java
===================================================================
--- branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java 2008-09-20
20:53:01 UTC (rev 9045)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java 2008-09-20
21:33:28 UTC (rev 9046)
@@ -937,6 +937,8 @@
servletContext = new MockServletContext();
initServletContext(servletContext.getInitParameters());
ServletLifecycle.beginApplication(servletContext);
+ FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
MockApplicationFactory.class.getName());
+ application = ((ApplicationFactory)
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
new Initialization(servletContext).create().init();
((Init)
servletContext.getAttribute(Seam.getComponentName(Init.class))).setDebug(false);
}
@@ -949,6 +951,8 @@
*/
protected void stopSeam() throws Exception
{
+ FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
MockApplicationFactory.class.getName());
+ ((ApplicationFactory)
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).setApplication(null);
ServletLifecycle.endApplication();
}
@@ -960,8 +964,6 @@
protected void setupClass() throws Exception
{
servletContext = (MockServletContext) ServletLifecycle.getServletContext();
- FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
MockApplicationFactory.class.getName());
- application = ((ApplicationFactory)
FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
phases = new SeamPhaseListener();
conversationViewRootAttributes = new HashMap<String, Map>();
seamFilter = createSeamFilter();
Show replies by date