assertEquals(null, actionURL.getPortletMode());
assertEquals(null, actionURL.getWindowState());
assertEquals(0, actionURL.getParameterMap().size());
//
return new InvokeGetResponse(s);
}
});
seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
{
protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
{
assertParameterMap(Collections.singletonMap("foo", new String[]{"fooAction"}), request);
assertEquals(PortletMode.EDIT, request.getPortletMode());
assertEquals(WindowState.MAXIMIZED, request.getWindowState());
}
});
seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
{
PortletURL renderURL = response.createRenderURL();
//
String s = renderURL.toString();
//
assertEquals(null, renderURL.getPortletMode());
assertEquals(null, renderURL.getWindowState());
assertEquals(0, renderURL.getParameterMap().size());
//
return new InvokeGetResponse(s);
}
});
seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
{
assertParameterMap(Collections.singletonMap("foo", new String[]{"fooRender"}), request);
assertEquals(PortletMode.VIEW, request.getPortletMode());
assertEquals(WindowState.NORMAL, request.getWindowState());
//
ResourceURL resourceURL = response.createResourceURL();
//
String s = resourceURL.toString();
//
assertEquals(ResourceURL.PAGE, resourceURL.getCacheability());
assertEquals(0, resourceURL.getParameterMap().size());
//
return new InvokeGetResponse(s);
}
});
seq.bindAction(3, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
{
protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException