[seam-commits] Seam SVN: r9048 - branches/community/Seam_2_0/src/main/org/jboss/seam/mock.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sat Sep 20 17:43:49 EDT 2008


Author: dan.j.allen
Date: 2008-09-20 17:43:49 -0400 (Sat, 20 Sep 2008)
New Revision: 9048

Modified:
   branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java
Log:
one more time, clean up application so that it parallel existing behavior (just loading it differently)


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 21:35:21 UTC (rev 9047)
+++ branches/community/Seam_2_0/src/main/org/jboss/seam/mock/BaseSeamTest.java	2008-09-20 21:43:49 UTC (rev 9048)
@@ -938,7 +938,6 @@
       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);
    }
@@ -951,8 +950,6 @@
     */
    protected void stopSeam() throws Exception
    {
-      FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY, MockApplicationFactory.class.getName());
-      ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).setApplication(null);
       ServletLifecycle.endApplication();
    }
    
@@ -964,6 +961,7 @@
    protected void setupClass() throws Exception
    {
       servletContext = (MockServletContext) ServletLifecycle.getServletContext();
+      application = ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).getApplication();
       phases = new SeamPhaseListener();
       conversationViewRootAttributes = new HashMap<String, Map>();
       seamFilter = createSeamFilter();
@@ -981,6 +979,7 @@
    protected void cleanupClass() throws Exception
    {
       seamFilter.destroy();
+      ((ApplicationFactory) FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY)).setApplication(null);
       conversationViewRootAttributes = null;
    }
 




More information about the seam-commits mailing list