You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Frank Bille Jensen (JIRA)" <ji...@apache.org> on 2008/06/13 09:34:45 UTC

[jira] Resolved: (WICKET-1628) WicketTester processRequestCycle fails to redirect from a mounted bookmarkable page if response is restarted at intercept page

     [ https://issues.apache.org/jira/browse/WICKET-1628?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Frank Bille Jensen resolved WICKET-1628.
----------------------------------------

    Resolution: Invalid

> WicketTester processRequestCycle fails to redirect from a mounted bookmarkable page if response is restarted at intercept page
> ------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-1628
>                 URL: https://issues.apache.org/jira/browse/WICKET-1628
>             Project: Wicket
>          Issue Type: Bug
>          Components: wicket
>    Affects Versions: 1.3.0-final
>            Reporter: Nick Johnson
>            Assignee: Frank Bille Jensen
>
> If in the WebApplication's init method, you call mountBookmarkablePage("/foo", Foo.class), and in a unit test do something like this:
> 		tester.setupRequestAndResponse(); 
> 		final WebRequestCycle cycle = tester.createRequestCycle(); 
> 		final String url = cycle.urlFor(Foo.class, pageParameters).toString(); 
> 		// set up and normalize a complete URL
> 		final URL oldUrl = new URL(tester.getServletRequest().getRequestURL().toString());
> 		final URI newUrl = new URL(oldUrl.getProtocol(), oldUrl.getHost(), oldUrl.getPort(), oldUrl.getPath() + "/" + url).toURI().normalize();
> 		
> 		tester.getServletRequest().setURL(newUrl.toASCIIString()); 
> 		tester.processRequestCycle(); 
> If Foo.class will throw a RestartResponseAtInterceptPageException (e.g., to force a login), then the following assertion will fail with "page was null":
> 		tester.assertRenderedPage(Login.class); 
> If the page isn't mounted in the WebApplication, it works as expected.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.