Examples of FakeHttpServletRequest


Examples of org.apache.shindig.common.testing.FakeHttpServletRequest

  public void testVerifyGet() throws Exception {
    expectTokenEntry();
    expectConsumer();
    replay();
    FakeOAuthRequest get = new FakeOAuthRequest("GET", TEST_URL, null, null);
    FakeHttpServletRequest request = get.sign(TOKEN,
        FakeOAuthRequest.OAuthParamLocation.URI_QUERY,
        FakeOAuthRequest.BodySigning.NONE);
    assertNotNull(reqHandler.getSecurityTokenFromRequest(request));
  }
View Full Code Here

Examples of org.directwebremoting.util.FakeHttpServletRequest

                {
                    HttpServletRequest request = wc.getHttpServletRequest();
                    if (request == null)
                    {
                        Loggers.STARTUP.warn("Using a FakeHttpServletRequest as part of setup");
                        request = new FakeHttpServletRequest();
                    }

                    moduleConfig = RequestUtils.getModuleConfig(request, wc.getServletContext());
                }
            }
View Full Code Here

Examples of org.infoglue.cms.util.FakeHttpServletRequest

        CacheController.cacheObject("userCache", "anonymous", principal);
    }

        FakeHttpSession fakeHttpServletSession = new FakeHttpSession();
        FakeHttpServletResponse fakeHttpServletResponse = new FakeHttpServletResponse();
        FakeHttpServletRequest fakeHttpServletRequest = new FakeHttpServletRequest();
        fakeHttpServletRequest.setParameter("siteNodeId", "" + siteNodeId);
        fakeHttpServletRequest.setParameter("languageId", "" + languageId);
        fakeHttpServletRequest.setParameter("contentId", "" + contentId);
        fakeHttpServletRequest.setRequestURI("ViewPage.action");

        fakeHttpServletRequest.setAttribute("siteNodeId", "" + siteNodeId);
        fakeHttpServletRequest.setAttribute("languageId", "" + languageId);
        fakeHttpServletRequest.setAttribute("contentId", "" + contentId);

        fakeHttpServletRequest.setServletContext(DeliverContextListener.getServletContext());
       
        BrowserBean browserBean = new BrowserBean();
      //this.browserBean.setRequest(getRequest());

    NodeDeliveryController nodeDeliveryController = NodeDeliveryController.getNodeDeliveryController(siteNodeId, languageId, contentId);
    IntegrationDeliveryController integrationDeliveryController  = IntegrationDeliveryController.getIntegrationDeliveryController(siteNodeId, languageId, contentId);
    TemplateController templateController = getTemplateController(dbWrapper, siteNodeId, languageId, contentId, new FakeHttpServletRequest(), (InfoGluePrincipal)principal, false, browserBean, nodeDeliveryController, integrationDeliveryController);
   
    DeliveryContext deliveryContext = DeliveryContext.getDeliveryContext(/*(InfoGluePrincipal)this.principal*/);
    //deliveryContext.setRepositoryName(repositoryName);
    deliveryContext.setSiteNodeId(siteNodeId);
    deliveryContext.setContentId(contentId);
 
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.