Howto test redirect to non-wicket base page

2009-10-12 Thread Per Newgro
Hi *, i would like to test behavior of my page. In constructor there is a redirect if page parameter not set. But the redirect target is a url and not a wicket page instance. What is the best attribute to add my assertion to? MyPage(PageParams p) { if (p.get(xyz) == null) {

Re: Howto test redirect to non-wicket base page

2009-10-12 Thread Erik van Oosten
Per, You can also throw a RestartResponseException or a subclass thereof. That is the recommended way within a constructor anyway. For you it would be RedirectToUrlException (or something like that). Regards, Erik. Per Newgro wrote: Hi *, i would like to test behavior of my page. In

Re: Howto test redirect to non-wicket base page

2009-10-12 Thread Per Newgro
Thanks Erik, this is definitly worth a shot. There seem to be many new classes in 1.4. So i have to dig deeper into wicket again. Thanks for showing me the light on this. Per - To unsubscribe, e-mail: