I'm looking at the following block of code in the MockWebApplication within
the method that is listed in the subject of this post;
else if (target instanceof
IBookmarkablePageRequestTarget)
{
// create a new request cycle for the
newPage call
createRequestCycle();
IBookmarkablePageRequestTarget
pageClassRequestTarget =
(IBookmarkablePageRequestTarget)target;
Class pageClass =
pageClassRequestTarget.getPageClass();
PageParameters parameters =
pageClassRequestTarget.getPageParameters();
if (parameters == null ||
parameters.size() == 0)
{
newLastRenderedPage = new
DefaultPageFactory().newPage(pageClass);
}
else
{
newLastRenderedPage = new
DefaultPageFactory().newPage(pageClass,
parameters);
}
}
I'm wondering if there is a good reason a new instance of DefaultPageFactory
is being used here instead of the one that is configure on the
WebApplication given to the WicketTester?
The problem I'm having is that I create my own extended version of
DefaultPageFactory for the purpose of being able to mock up the response
page when unit testing and rely on that version when testing.
-Craig
--
View this message in context:
http://www.nabble.com/MockWebApplication.generateLastRenderedPage%28WebRequestCycle-cycle%29-tf4445983.html#a12685831
Sent from the Wicket - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]