incubator-adffaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From awi...@apache.org
Subject svn commit: r462496 - /incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java
Date Tue, 10 Oct 2006 18:52:14 GMT
Author: awiner
Date: Tue Oct 10 11:52:13 2006
New Revision: 462496

URL: http://svn.apache.org/viewvc?view=rev&rev=462496
Log:
Fix RenderKitTest to handle renderers that try to access the session map

Modified:
    incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java

Modified: incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java
URL: http://svn.apache.org/viewvc/incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java?view=diff&rev=462496&r1=462495&r2=462496
==============================================================================
--- incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java
(original)
+++ incubator/adffaces/trunk/trinidad/trinidad-impl/src/test/java/org/apache/myfaces/trinidadinternal/renderkit/MFacesContext.java
Tue Oct 10 11:52:13 2006
@@ -293,6 +293,17 @@
     }
 
     @Override
+    public Map<String, Object> getSessionMap()
+    {
+      // The underlying Shale Test implementation goes to the servlet
+      // request, session, etc.  For the purposes of this test,
+      // we shouldn't use any servlet APIs.  So, intercept the
+      // session map.   Ideally, renderers shouldn't write into
+      // the session map, but see above...
+      return _sessionMap;
+    }
+
+    @Override
     public Map<String, Object> getRequestMap()
     {
       // this method is called a lot, so we don't want to use the "mock"
@@ -301,6 +312,7 @@
     }
 
     private final Map<String, Object> _requestMap = new HashMap<String, Object>(2);
+    private final Map<String, Object> _sessionMap = new HashMap<String, Object>(2);
     private final Map<String, Object> _applicationMap = new HashMap<String, Object>(2);
     private final boolean _testMode;
   }



Mime
View raw message