//
return new InvokeGetResponse(response.createActionURL().toString());
}
});
seq.bindAction(1, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
{
protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertNull(cookieMap.get("action_cookie"));
//
Cookie cookie = new Cookie("action_cookie", "action_cookie_value");
response.addProperty(cookie);
//
response.setEvent("Event", null);
}
});
seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
{
protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
}
});
seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
//
return new InvokeGetResponse(response.createActionURL().toString());
}
});
seq.bindAction(2, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
{
protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
//
response.setEvent("Event", null);
}
});
seq.bindAction(2, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
{
protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
assertNull(cookieMap.get("event_cookie"));
//
Cookie cookie = new Cookie("event_cookie", "event_cookie_value");
response.addProperty(cookie);
}
});
seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));
assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
assertEquals("event_cookie_value", cookieMap.get("event_cookie"));
//
return new InvokeGetResponse(response.createActionURL().toString());
}
});
seq.bindAction(3, UTP1.ACTION_JOIN_POINT, new PortletActionTestAction()
{
protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
{
Map<String, String> cookieMap = createCookieMap(request);
assertEquals("render_cookie_value", cookieMap.get("render_cookie"));