[
https://issues.apache.org/jira/browse/WICKET-1434?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Igor Vaynberg updated WICKET-1434:
----------------------------------
Fix Version/s: 1.3.3
> WicketTester.startPage(Class) does not trigger WebRequestCycle.onBeginRequest
> -----------------------------------------------------------------------------
>
> Key: WICKET-1434
> URL: https://issues.apache.org/jira/browse/WICKET-1434
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.2
> Reporter: Lars Vonk
> Fix For: 1.5-M1
>
>
> While using WicketTester to test my WebApplication that is using a custom
> WebRequestCycle and WebRequestCycleProcessor I noticed that WicketTester does
> not follow the same RequestCycle as it would do when running in a real live
> environment resulting in MyWebRequestCycle.onBeginRequest not being called.
> Using startPage(Page) will call MyWebRequestCycle.onBeginRequest but then the
> IRequestTarget that is resolved from the Request indicates the Request comes
> from the DummyHomePage.testPage link.
> Can startPage be implemented that it really resembles the real live
> environment? After some research and testing I came up with this
> implementation, maybe it can be used:
> public Page startPage(Class pageClass) {
> WebRequestCycle requestCycle = super.setupRequestAndResponse();
>
> requestCycle.getRequest().getRequestParameters().setBookmarkablePageClass(pageClass.getName());
> super.processRequestCycle(requestCycle);
> return super.getLastRenderedPage();
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.