You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Craig Lenzen <le...@visi.com> on 2007/09/15 02:25:39 UTC
MockWebApplication.generateLastRenderedPage(WebRequestCycle cycle)
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: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org