Examples of DriverResponse


Examples of org.jboss.unit.driver.DriverResponse

         IOException ioe = new IOException();
         ExceptionCallback cb5 = new ExceptionCallback(appContext, ioe, ioe);

         //
         ServletContextDispatcher dispatcher = new ServletContextDispatcher(req, resp, container);
         DriverResponse response = cb1.test(null, dispatcher);
         response = cb2.test(response, dispatcher);
         response = cb3.test(response, dispatcher);
         response = cb4.test(response, dispatcher);
         response = cb5.test(response, dispatcher);
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

      boolean sendResponse = false;

      //
      try
      {
         DriverResponse driverResponse = runWithRuntimeException(portlet, request, response, context);
         sendResponse = attemptToSendResponse;
         return driverResponse;
      }
      catch (AssertionError t)
      {
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

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

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

            //
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

            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);

                  //
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

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

            //
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

         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
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

      {
         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)
            {
               ctx.updateResponse(dr);
            }
         }
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

      this.responseContext = responseContext;
   }

   public synchronized void runTest(TestServlet testServlet, WebRequest req, WebResponse resp) throws ServletException, IOException
   {
     DriverResponse response;
     try
     {
       response = service(testServlet, req, resp);
     }
     catch (AssertionError e)
View Full Code Here

Examples of org.jboss.unit.driver.DriverResponse

               rets.put(COUNT_KEY, "1");
               return super.doCallback(dispatchedServletContext, dispatchedRequest, dispatchedResponse, handback);
            }
         };

         DriverResponse response = cb.test(null, dispatcher);
         if (response != null)
            return response;

         // Check that the callback was invoked and the other context really was used with another session
         assertEquals("1", req.getSession().getAttribute(CROSS_CTX_TEST_ATTR));
         assertEquals("1", rets.get(COUNT_KEY));

         String url = resp.renderURL("/", null, null);
         return new InvokeGetResponse(url);
      }
      else if (getRequestCount() == 3)
      {
         // Check that the sessions retained values between requests
         // test-spi-server context
         assertEquals("1", req.getSession().getAttribute(CROSS_CTX_TEST_ATTR));

         // test-spi-app context

         // Map to get data from includes
         final Map<String, String> rets = new HashMap<String, String>();

         ServletContext appContext = testServlet.getServletContext().getContext("/test-spi-app");
         ServletContextDispatcher dispatcher = new ServletContextDispatcher(req, resp, container);

         NormalCallback cb = new NormalCallback(appContext, registry.getWebApp("/test-spi-app").getClassLoader())
         {
            public Object doCallback(ServletContext dispatchedServletContext, HttpServletRequest dispatchedRequest, HttpServletResponse dispatchedResponse, Object handback) throws ServletException, IOException
            {
               rets.put(CROSS_CTX_TEST_ATTR, (String) dispatchedRequest.getSession().getAttribute(CROSS_CTX_TEST_ATTR));
               rets.put(COUNT_KEY, "1");
               return super.doCallback(dispatchedServletContext, dispatchedRequest, dispatchedResponse, handback);
            }
         };

         DriverResponse response = cb.test(null, dispatcher);
         if (response != null)
            return response;

         // Check that the callback was invoked and the other context really was used with another session
         assertEquals("1", rets.get(COUNT_KEY));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.