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

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


            //
            resp.setEvent("Event", null);
         }
      });
      seq.bindAction(1, UTP3.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest req, EventResponse resp, PortletTestContext context) throws PortletException, IOException
         {
            assertSame(PropagateDoFilterArgsFilter1.publishedEventRequest, PropagateDoFilterArgsFilter2.consumedEventRequest);
            assertSame(PropagateDoFilterArgsFilter1.publishedEventResponse, PropagateDoFilterArgsFilter2.consumedEventResponse);
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
         {
            dispatch(portlet, request, response);
         }
View Full Code Here

         protected void run(Portlet portlet, ActionRequest request, ActionResponse response, PortletTestContext context) throws PortletException, IOException
         {
            response.setEvent(new QName("urn:explicit-namespace", "Foo"), "Bar");
         }
      });
      seq.bindAction(1, UTP2.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("urn:explicit-namespace", "Foo"), event.getQName());
View Full Code Here

         {
            response.setRenderParameter("foo", "fooaction2");
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(2, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            if ("Foo".equals(request.getEvent().getName()))
            {
               assertRenderParameter(request, "foo", "fooaction2");
               response.setRenderParameter("foo", "fooevent1");
            }
            else
            {
               fail();
            }
         }
      });
      seq.bindAction(2, UTP1.RENDER_JOIN_POINT, new PortletRenderTestAction()
      {
         protected Response run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context)
         {
            assertRenderParameter(request, "foo", "fooevent1");
            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
         {
            response.setRenderParameter("foo", "fooaction3");
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(3, UTP1.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            String eventName = request.getEvent().getName();
            if ("Foo".equals(eventName))
View Full Code Here

            events.clear();
            response.setEvent("Foo", null);
            response.setEvent(new QName("urn:explicit-namespace", "Foo"), null);
         }
      });
      seq.bindAction(1, UTP4.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            Event event = request.getEvent();
            events.add(event.getQName());
View Full Code Here

            {
               response.setEvent("Bar", payload);
            }
         }
      });
      seq.bindAction(1, UTP6.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            Event event = request.getEvent();
            if ("Bar".equals(event.getName()) && event.getValue() != null)
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
         {
            eventCount++;
View Full Code Here

         {
            events.clear();
            response.setEvent("Foo", null);
         }
      });
      seq.bindAction(1, UTP5.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
            Event event = request.getEvent();
View Full Code Here

            {
               fail(e);
            }
         }
      });
      seq.bindAction(1, UTP7.EVENT_JOIN_POINT, new PortletEventTestAction()
      {
         protected void run(Portlet portlet, EventRequest request, EventResponse response, PortletTestContext context) throws PortletException, IOException
         {
         }
      });
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, UTP3.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("urn:default-namespace", "Foo"), event.getQName());
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.