Package org.apache.wicket.protocol.http

Examples of org.apache.wicket.protocol.http.WebRequestCycle.request()


    cycle.setResponse(new StringResponse());
    try
    {
      // Decompose processRequestCycle() as error pages are not rendered in WicketTester, the
      // exception is thrown instead
      cycle.request(new BookmarkablePageRequestTarget(BrokenPage.class));
      Method method = MockWebApplication.class.getDeclaredMethod("generateLastRenderedPage",
        new Class[] { WebRequestCycle.class });
      method.setAccessible(true);
      Page page = (Page)method.invoke(tester, new Object[] { cycle });
      assertTrue("Page is not an ExceptionErrorPage", page instanceof ExceptionErrorPage);
View Full Code Here


    cycle.setResponse(new StringResponse());
    try
    {
      // Decompose processRequestCycle() as error pages are not rendered in WicketTester, the
      // exception is thrown instead
      cycle.request(new BookmarkablePageRequestTarget(BrokenPage.class));
      Method method = MockWebApplication.class.getDeclaredMethod("generateLastRenderedPage",
          new Class[] { WebRequestCycle.class });
      method.setAccessible(true);
      Page page = (Page)method.invoke(tester, new Object[] { cycle });
      assertTrue("Page is not an ExceptionErrorPage", page instanceof ExceptionErrorPage);
View Full Code Here

    // subject
    WebRequestCycle cycle = ((WebRequestCycle) RequestCycle.get());
    assertNotNull(cycle);
    try
    {
      cycle.request(new BookmarkablePageRequestTarget(MockLoginPage.class, null));
    }
    finally
    {
      cycle.getResponse().close();
    }
View Full Code Here

    WebRequestCycle cycle = tester.createRequestCycle();
    cycle.setResponse(new StringResponse());
    try
    {
      // Decompose processRequestCycle() as error pages are not rendered in WicketTester, the exception is thrown instead
      cycle.request(new BookmarkablePageRequestTarget(BrokenPage.class));
      Method method = MockWebApplication.class.getDeclaredMethod("generateLastRenderedPage", new Class[]{WebRequestCycle.class});
      method.setAccessible(true);
      Page page = (Page)method.invoke(tester, new Object[]{cycle});
      assertTrue("Page is not an ExceptionErrorPage", page instanceof ExceptionErrorPage);
      WebRequestCycle cycle2 = tester.createRequestCycle();
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.