Package org.gatein.pc.test.unit

Examples of org.gatein.pc.test.unit.TestAction


      //
      if (portletTestCase != null)
      {
         //
         TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), actionJoinPoint);

         //
         DriverResponse response;
         if (action instanceof PortletTestAction)
         {
            log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);

            //
            response = ((PortletTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action instanceof PortletActionTestAction)
         {
            log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);

            //
            response = ((PortletActionTestAction)action).execute(this, req, resp, ctx);
         }
         else
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
               " " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
               action.getClass().getName()));
         }

         //
         if (response != null)
         {
View Full Code Here


         //
         if (portletTestCase != null)
         {
            //
            TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), eventJoinPoint);

            //
            if (action != null)
            {
               DriverResponse response = null;
               if (action instanceof PortletTestAction)
               {
                  log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);

                  //
                  response = ((PortletTestAction)action).execute(this, req, resp, ctx);
               }
               else if (action instanceof PortletEventTestAction)
               {
                  log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);

                  //
                  response = ((PortletEventTestAction)action).execute(this, req, resp, ctx);
               }
               else if (action == null)
               {
                  response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
                     " " + NodeId.locate() + " " + actionJoinPoint + " is null"));
               }
               else
               {
                  response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
                     " " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
                     action.getClass().getName()));
               }

               //
               if (response != null)
               {
View Full Code Here

      {
         reset();
      }

      // Get the action
      TestAction action = null;
      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), renderJoinPoint);
      }

      //
      if (action != null)
      {
         // Get the result
         DriverResponse response;
         if (action instanceof PortletTestAction)
         {
            log.debug("Found action for joinpoint " + renderJoinPoint + " : " + action);

            //
            response = ((PortletTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action instanceof PortletRenderTestAction)
         {
            log.debug("Found action for joinpoint " + renderJoinPoint + " : " + action);

            //
            response = ((PortletRenderTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action == null)
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " is null"));
         }
         else
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " does not have the right type but has the type " +
            action.getClass().getName()));
         }

         // If we have one result it is meant to be returned to the client
         if (response != null)
         {
View Full Code Here

      log.debug("JoinPoint '" + resourceJoinPoint +  " invoked for '"
         + ctx.getTestName() + "' testId and '" +
         +ctx.getRequestCount() + "' request count");

      // Get the action
      TestAction action = null;
      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), resourceJoinPoint);

      }

      //
      DriverResponse response;
      if (action instanceof PortletTestAction)
      {
         log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);

         // Get the result that must exist since it is the only joinpoint invoked during this request
         response = ((PortletTestAction)action).execute(this, req, resp, ctx);
      }
      else if (action instanceof PortletResourceTestAction)
      {
         log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);

         // Get the result that must exist since it is the only joinpoint invoked during this request
         response = ((PortletResourceTestAction)action).execute(this, req, resp, ctx);
      }
      else if (action == null)
      {
         response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " is null"));
      }
      else
      {
         response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " does not have the right type but has the type " +
            action.getClass().getName()));
      }

      //
      if (response != null)
      {
View Full Code Here

      }

      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), getServiceJointpoint());
         if (action != null && action instanceof ServletServiceTestAction)
         {
            log.info("Found Action for this jointpoint");
            DriverResponse dr = ((ServletServiceTestAction)action).execute(this, request, response, ctx);
            if (dr != null)
View Full Code Here

      //
      if (portletTestCase != null)
      {
         //
         TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), actionJoinPoint);

         //
         DriverResponse response;
         if (action instanceof PortletTestAction)
         {
            log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);

            //
            response = ((PortletTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action instanceof PortletActionTestAction)
         {
            log.debug("Found action for jointpoint " + actionJoinPoint + " : " + action);

            //
            response = ((PortletActionTestAction)action).execute(this, req, resp, ctx);
         }
         else
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
               " " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
               action.getClass().getName()));
         }

         //
         if (response != null)
         {
View Full Code Here

         //
         if (portletTestCase != null)
         {
            //
            TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), eventJoinPoint);

            //
            if (action != null)
            {
               DriverResponse response = null;
               if (action instanceof PortletTestAction)
               {
                  log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);

                  //
                  response = ((PortletTestAction)action).execute(this, req, resp, ctx);
               }
               else if (action instanceof PortletEventTestAction)
               {
                  log.debug("Found action for jointpoint " + eventJoinPoint + " : " + action);

                  //
                  response = ((PortletEventTestAction)action).execute(this, req, resp, ctx);
               }
               else if (action == null)
               {
                  response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
                     " " + NodeId.locate() + " " + actionJoinPoint + " is null"));
               }
               else
               {
                  response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
                     " " + NodeId.locate() + " " + actionJoinPoint + " does not have the right type but has the type " +
                     action.getClass().getName()));
               }

               //
               if (response != null)
               {
View Full Code Here

      {
         reset();
      }

      // Get the action
      TestAction action = null;
      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), renderJoinPoint);
      }

      //
      if (action != null)
      {
         // Get the result
         DriverResponse response;
         if (action instanceof PortletTestAction)
         {
            log.debug("Found action for joinpoint " + renderJoinPoint + " : " + action);

            //
            response = ((PortletTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action instanceof PortletRenderTestAction)
         {
            log.debug("Found action for joinpoint " + renderJoinPoint + " : " + action);

            //
            response = ((PortletRenderTestAction)action).execute(this, req, resp, ctx);
         }
         else if (action == null)
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " is null"));
         }
         else
         {
            response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " does not have the right type but has the type " +
            action.getClass().getName()));
         }

         // If we have one result it is meant to be returned to the client
         if (response != null)
         {
View Full Code Here

      log.debug("JoinPoint '" + resourceJoinPoint +  " invoked for '"
         + ctx.getTestName() + "' testId and '" +
         +ctx.getRequestCount() + "' request count");

      // Get the action
      TestAction action = null;
      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), resourceJoinPoint);

      }

      //
      DriverResponse response;
      if (action instanceof PortletTestAction)
      {
         log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);

         // Get the result that must exist since it is the only joinpoint invoked during this request
         response = ((PortletTestAction)action).execute(this, req, resp, ctx);
      }
      else if (action instanceof PortletResourceTestAction)
      {
         log.debug("Found action for joinpoint " + resourceJoinPoint + " : " + action);

         // Get the result that must exist since it is the only joinpoint invoked during this request
         response = ((PortletResourceTestAction)action).execute(this, req, resp, ctx);
      }
      else if (action == null)
      {
         response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " is null"));
      }
      else
      {
         response = new FailureResponse(Failure.createAssertionFailure("Action for " + ctx.getRequestCount() +
            " " + NodeId.locate() + " " + resourceJoinPoint + " does not have the right type but has the type " +
            action.getClass().getName()));
      }

      //
      if (response != null)
      {
View Full Code Here

      }

      PortletTestCase portletTestCase = getSequence(ctx.getTestName());
      if (portletTestCase != null)
      {
         TestAction action = portletTestCase.getAction(ctx.getRequestCount(), NodeId.locate(), getServiceJointpoint());
         if (action != null && action instanceof ServletServiceTestAction)
         {
            log.info("Found Action for this jointpoint");
            DriverResponse dr = ((ServletServiceTestAction)action).execute(this, request, response, ctx);
            if (dr != null)
View Full Code Here

TOP

Related Classes of org.gatein.pc.test.unit.TestAction

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.