struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nil...@apache.org
Subject svn commit: r724183 - /struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
Date Sun, 07 Dec 2008 19:48:57 GMT
Author: nilsga
Date: Sun Dec  7 11:48:56 2008
New Revision: 724183

URL: http://svn.apache.org/viewvc?rev=724183&view=rev
Log:
Forgot to commit the updated test...

Modified:
    struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java

Modified: struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java?rev=724183&r1=724182&r2=724183&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
(original)
+++ struts/struts2/trunk/plugins/portlet/src/test/java/org/apache/struts2/views/jsp/PortletUrlTagTest.java
Sun Dec  7 11:48:56 2008
@@ -33,11 +33,13 @@
 import javax.portlet.WindowStateException;
 
 import org.apache.struts2.ServletActionContext;
+import org.apache.struts2.StrutsStatics;
 import org.apache.struts2.StrutsTestCase;
 import org.apache.struts2.portlet.PortletActionConstants;
 import org.apache.struts2.portlet.servlet.PortletServletRequest;
 import org.apache.struts2.portlet.util.PortletUrlHelper;
 import org.springframework.mock.web.portlet.MockPortalContext;
+import org.springframework.mock.web.portlet.MockPortletContext;
 import org.springframework.mock.web.portlet.MockPortletURL;
 import org.springframework.mock.web.portlet.MockRenderRequest;
 import org.springframework.mock.web.portlet.MockRenderResponse;
@@ -75,6 +77,8 @@
 	private MockActionProxy actionProxy;
 
 	private MockJspWriter jspWriter;
+	
+	private MockPortletContext portletContext;
 
 	public void setUp() throws Exception {
 		super.setUp();
@@ -82,6 +86,7 @@
 		context = ActionContext.getContext();
 		stack = context.getValueStack();
 
+		portletContext = new MockPortletContext();
 		renderRequest = new MockRenderRequest();
 		renderRequest.setAttribute(ServletActionContext.STRUTS_VALUESTACK_KEY, stack);
 		renderUrl = new MockPortletUrl("render");
@@ -107,6 +112,7 @@
 		context.put(PortletActionConstants.RESPONSE, renderResponse);
 		context.put(PortletActionConstants.PHASE, PortletActionConstants.RENDER_PHASE);
 		context.put(PortletActionConstants.MODE_NAMESPACE_MAP, modeMap);
+		context.put(StrutsStatics.STRUTS_PORTLET_CONTEXT, portletContext);
 
 		actionInvocation = new MockActionInvocation();
 		actionProxy = new MockActionProxy();



Mime
View raw message