Package org.gatein.pc.test.unit.actions

Examples of org.gatein.pc.test.unit.actions.PortletEventTestAction


            //
            response.setEvent("Event", null);
         }
      });
      seq.bindAction(1, UTP6.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertEquals(PortletRequest.EVENT_PHASE, request.getAttribute(PortletRequest.LIFECYCLE_PHASE));
         }
View Full Code Here


         protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
         {
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            Event event = request.getEvent();
            assertEquals(new QName(XMLConstants.NULL_NS_URI, "Foo"), event.getQName());
View Full Code Here

            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.ACTION));
            assertFalse((TraceFilter.isActive("PartialWildcardFilter", TraceFilter.ACTION)));
            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
         {
            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.EVENT));
            assertFalse((TraceFilter.isActive("PartialWildcardFilter", TraceFilter.EVENT)));
         }
      });
      seq.bindAction(1, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
      {
         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.RENDER));
            assertFalse((TraceFilter.isActive("PartialWildcardFilter", TraceFilter.RENDER)));
            return new InvokeGetResponse(response.createResourceURL().toString());
         }
      });
      seq.bindAction(2, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
      {
         protected Response run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.RESOURCE));
            assertFalse((TraceFilter.isActive("PartialWildcardFilter", TraceFilter.RESOURCE)));
            return new InvokeGetResponse(response.createRenderURL().toString());
         }
      });
      seq.bindAction(3, UTP2.RENDER_JOIN_POINT, new PortletRenderTestAction()
      {
         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
         {
            return new InvokeGetResponse(response.createActionURL().toString());
         }
      });
      seq.bindAction(4, UTP2.ACTION_JOIN_POINT, new PortletActionTestAction()
      {
         protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.ACTION));
            assertTrue(TraceFilter.isActive("PartialWildcardFilter", TraceFilter.ACTION));
            response.setEvent("Event", null);
         }
      });
      seq.bindAction(4, UTP2.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertTrue(TraceFilter.isActive("WildcardFilter", TraceFilter.EVENT));
            assertTrue(TraceFilter.isActive("PartialWildcardFilter", TraceFilter.EVENT));
View Full Code Here

            {
            }
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            try
            {
View Full Code Here

         {
            response.setRenderParameter("foo", "bar");
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            //
            assertEquals("bar", request.getParameter("foo"));
View Full Code Here

            request.setAttribute("action_attr3", "action_attr3_action_value");
            request.setAttribute("action_attr4", "action_attr4_action_value");
            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
         {
            if (request.getEvent().getValue() == null)
            {
View Full Code Here

         protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
         {
            response.setEvent("Event", null);
         }
      });
      seq.bindAction(4, UTP2.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            response.setProperty("Foo", "Bar_event");
         }
View Full Code Here

            assertNull(request.getParameter(PortletRequest.ACTION_SCOPE_ID));
            request.setAttribute("foo", "foo");
            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
         {
            assertNotNull(request.getParameter(PortletRequest.ACTION_SCOPE_ID));
            assertEquals("foo", request.getAttribute("foo"));
View Full Code Here

            //
            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"));
            assertEquals("action_cookie_value", cookieMap.get("action_cookie"));
            assertEquals("event_cookie_value", cookieMap.get("event_cookie"));

            //
            response.setEvent("Event", null);
         }
      });
      seq.bindAction(3, 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"));
View Full Code Here

            commonPayload = new CommonEventPayload();
            commonPayload.setString("commonpingvalue");
            response.setEvent("CommonPing", commonPayload);
         }
      });
      seq.bindAction(1, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            assertEquals("commonpingvalue", commonPayload.getString());
            Event event = request.getEvent();
View Full Code Here

TOP

Related Classes of org.gatein.pc.test.unit.actions.PortletEventTestAction

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.