expectedPublicMap.put("bar",new String[]{"bar_value1","bar_value2"});
expectedPublicMap.put("juu",new String[]{"juu_value1","juu_value2"});
expectedPublicMap.put("daa",new String[]{"daa_value1","daa_value2"});
//
seq.bindAction(0, UTP5.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
{
PortletURL renderURL = response.createRenderURL();
renderURL.setParameter("foo", new String[]{"foo_value1","foo_value2"});
renderURL.setParameter("bar", new String[]{"bar_value1","bar_value2"});
renderURL.setParameter("juu", new String[]{"juu_value1","juu_value2"});
renderURL.setParameter("daa", new String[]{"daa_value1","daa_value2"});
return new InvokeGetResponse(renderURL.toString());
}
});
seq.bindAction(1, UTP5.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
{
PortletURL actionURL = response.createActionURL();
actionURL.setParameter("bar", new String[]{"is_bar_value1","is_bar_value2"});
actionURL.setParameter("daa", new String[]{"is_daa_value1","is_daa_value2"});
//
InvokePostResponse post = new InvokePostResponse(actionURL.toString());
Body.Form form = new Body.Form();
form.addParameter("juu", new String[]{"form_juu_value1","form_juu_value2"});
form.addParameter("daa", new String[]{"form_daa_value1","form_daa_value2"});
post.setBody(form);
//
return post;
}
});
seq.bindAction(2, UTP5.ACTION_JOIN_POINT, new PortletActionTestAction()
{
protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
{
assertParameterMap(expectedClientDataMap, request);
assertEquals(expectedClientDataPrivateMap, request.getPrivateParameterMap());
assertEquals(expectedPublicMap, request.getPublicParameterMap());
response.setEvent("Event", null);
}
});
seq.bindAction(2, UTP5.EVENT_JOIN_POINT, new PortletEventTestAction()
{
protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
{
assertParameterMap(expectedPublicMap, request);
assertEquals(Collections.emptyMap(), request.getPrivateParameterMap());
assertEquals(expectedPublicMap, request.getPublicParameterMap());
}
});
seq.bindAction(2, UTP5.RENDER_JOIN_POINT, new PortletRenderTestAction()
{
protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
{
assertParameterMap(expectedPublicMap, request);
assertEquals(Collections.emptyMap(), request.getPrivateParameterMap());