[jboss-cvs] jboss-seam/src/test/misc/org/jboss/seam/test ...
Gavin King
gavin.king at jboss.com
Sun Jun 10 15:40:28 EDT 2007
User: gavin
Date: 07/06/10 15:40:28
Modified: src/test/misc/org/jboss/seam/test ContextTest.java
InterceptorTest.java PhaseListenerTest.java
Log:
cleaner
Revision Changes Path
1.24 +12 -12 jboss-seam/src/test/misc/org/jboss/seam/test/ContextTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: ContextTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/ContextTest.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -b -r1.23 -r1.24
--- ContextTest.java 10 Jun 2007 19:26:00 -0000 1.23
+++ ContextTest.java 10 Jun 2007 19:40:28 -0000 1.24
@@ -1,4 +1,4 @@
-//$Id: ContextTest.java,v 1.23 2007/06/10 19:26:00 gavin Exp $
+//$Id: ContextTest.java,v 1.24 2007/06/10 19:40:28 gavin Exp $
package org.jboss.seam.test;
import java.util.Map;
@@ -7,11 +7,11 @@
import javax.servlet.http.HttpServletRequest;
import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.BasicContext;
+import org.jboss.seam.contexts.ApplicationContext;
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
+import org.jboss.seam.contexts.EventContext;
import org.jboss.seam.contexts.Lifecycle;
import org.jboss.seam.contexts.ServerConversationContext;
import org.jboss.seam.contexts.SessionContext;
@@ -44,7 +44,7 @@
MockServletContext servletContext = new MockServletContext();
MockExternalContext externalContext = new MockExternalContext(servletContext);
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
//appContext.set( Seam.getComponentName(Init.class), new Init() );
installComponent(appContext, ConversationEntries.class);
installComponent(appContext, Manager.class);
@@ -81,10 +81,10 @@
assert Contexts.getSessionContext()!=null;
assert Contexts.getConversationContext()!=null;
assert Contexts.getApplicationContext()!=null;
- assert Contexts.getEventContext() instanceof BasicContext;
+ assert Contexts.getEventContext() instanceof EventContext;
assert Contexts.getSessionContext() instanceof SessionContext;
assert Contexts.getConversationContext() instanceof ServerConversationContext;
- assert Contexts.getApplicationContext() instanceof BasicContext;
+ assert Contexts.getApplicationContext() instanceof ApplicationContext;
Contexts.getSessionContext().set("zzz", "bar");
Contexts.getApplicationContext().set("zzz", "bar");
@@ -126,10 +126,10 @@
assert Contexts.getSessionContext()!=null;
assert Contexts.getConversationContext()!=null;
assert Contexts.getApplicationContext()!=null;
- assert Contexts.getEventContext() instanceof BasicContext;
+ assert Contexts.getEventContext() instanceof EventContext;
assert Contexts.getSessionContext() instanceof SessionContext;
assert Contexts.getConversationContext() instanceof ServerConversationContext;
- assert Contexts.getApplicationContext() instanceof BasicContext;
+ assert Contexts.getApplicationContext() instanceof ApplicationContext;
assert Contexts.getSessionContext().get("zzz").equals("bar");
assert Contexts.getApplicationContext().get("zzz").equals("bar");
@@ -176,19 +176,19 @@
ExternalContext externalContext = new MockExternalContext(servletContext, request);
Map sessionAdaptor = new ServletRequestSessionMap(request);
Map requestAdaptor = new ServletRequestMap(request);
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
installComponent(appContext, ConversationEntries.class);
installComponent(appContext, Manager.class);
appContext.set( Seam.getComponentName(Init.class), new Init() );
Lifecycle.beginRequest(externalContext);
Manager.instance().setLongRunningConversation(true);
- testContext( new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() ) );
+ testContext( new ApplicationContext( externalContext.getApplicationMap() ) );
testContext( new SessionContext(sessionAdaptor) );
- testContext( new BasicContext(ScopeType.EVENT, requestAdaptor) );
+ testContext( new EventContext(requestAdaptor) );
testContext( new ServerConversationContext(sessionAdaptor, "1") );
testEquivalence( new ServerConversationContext(sessionAdaptor, "1"), new ServerConversationContext(sessionAdaptor, "1") );
testEquivalence( new SessionContext(sessionAdaptor), new SessionContext(sessionAdaptor) );
- testEquivalence( new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() ),new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() ) );
+ testEquivalence( new ApplicationContext( externalContext.getApplicationMap() ), new ApplicationContext( externalContext.getApplicationMap() ) );
testIsolation( new ServerConversationContext(sessionAdaptor, "1"), new ServerConversationContext(sessionAdaptor, "2") );
// testIsolation( new WebSessionContext(externalContext), new WebSessionContext( new MockExternalContext()) );
1.32 +7 -8 jboss-seam/src/test/misc/org/jboss/seam/test/InterceptorTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: InterceptorTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/InterceptorTest.java,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -b -r1.31 -r1.32
--- InterceptorTest.java 10 Jun 2007 19:26:00 -0000 1.31
+++ InterceptorTest.java 10 Jun 2007 19:40:28 -0000 1.32
@@ -1,4 +1,4 @@
-//$Id: InterceptorTest.java,v 1.31 2007/06/10 19:26:00 gavin Exp $
+//$Id: InterceptorTest.java,v 1.32 2007/06/10 19:40:28 gavin Exp $
package org.jboss.seam.test;
import java.lang.reflect.Method;
@@ -9,9 +9,8 @@
import org.jboss.seam.Component;
import org.jboss.seam.RequiredException;
-import org.jboss.seam.ScopeType;
import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.BasicContext;
+import org.jboss.seam.contexts.ApplicationContext;
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.Lifecycle;
@@ -41,7 +40,7 @@
{
MockServletContext servletContext = new MockServletContext();
MockExternalContext externalContext = new MockExternalContext(servletContext);
- Context appContext =new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
appContext.set( Seam.getComponentName(Init.class), new Init() );
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
@@ -239,7 +238,7 @@
{
MockServletContext servletContext = new MockServletContext();
MockExternalContext externalContext = new MockExternalContext(servletContext);
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
appContext.set( Seam.getComponentName(Init.class), new Init() );
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
@@ -496,7 +495,7 @@
{
MockServletContext servletContext = new MockServletContext();
MockExternalContext externalContext = new MockExternalContext(servletContext);
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
appContext.set( Seam.getComponentName(Init.class), new Init() );
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
@@ -605,7 +604,7 @@
ExternalContext externalContext = new MockExternalContext(servletContext);
new MockFacesContext( externalContext, new MockApplication() ).setCurrent().createViewRoot();
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
appContext.set( Seam.getComponentName(Init.class), new Init() );
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
@@ -713,7 +712,7 @@
{
MockServletContext servletContext = new MockServletContext();
MockExternalContext externalContext = new MockExternalContext(servletContext);
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
appContext.set( Seam.getComponentName(Init.class), new Init() );
appContext.set(
Seam.getComponentName(ConversationEntries.class) + ".component",
1.34 +3 -3 jboss-seam/src/test/misc/org/jboss/seam/test/PhaseListenerTest.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PhaseListenerTest.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/test/misc/org/jboss/seam/test/PhaseListenerTest.java,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -b -r1.33 -r1.34
--- PhaseListenerTest.java 10 Jun 2007 19:26:00 -0000 1.33
+++ PhaseListenerTest.java 10 Jun 2007 19:40:28 -0000 1.34
@@ -1,4 +1,4 @@
-//$Id: PhaseListenerTest.java,v 1.33 2007/06/10 19:26:00 gavin Exp $
+//$Id: PhaseListenerTest.java,v 1.34 2007/06/10 19:40:28 gavin Exp $
package org.jboss.seam.test;
import java.util.ArrayList;
@@ -13,7 +13,7 @@
import org.jboss.seam.Component;
import org.jboss.seam.ScopeType;
import org.jboss.seam.Seam;
-import org.jboss.seam.contexts.BasicContext;
+import org.jboss.seam.contexts.ApplicationContext;
import org.jboss.seam.contexts.Context;
import org.jboss.seam.contexts.Contexts;
import org.jboss.seam.contexts.SessionContext;
@@ -65,7 +65,7 @@
facesContext.setCurrent().createViewRoot();
facesContext.getApplication().setStateManager( new SeamStateManager( facesContext.getApplication().getStateManager() ) );
- Context appContext = new BasicContext( ScopeType.APPLICATION, externalContext.getApplicationMap() );
+ Context appContext = new ApplicationContext( externalContext.getApplicationMap() );
installComponents(appContext);
return facesContext;
}
More information about the jboss-cvs-commits
mailing list