wicket-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Stoch <daniel.st...@gmail.com>
Subject Re: WicketTester.isRenderedPage() in 6.13
Date Wed, 05 Feb 2014 09:45:02 GMT
It works!
Thanks for your fast replay :)

--
Daniel


On Wed, Feb 5, 2014 at 10:40 AM, Martin Grigorov <mgrigorov@apache.org>wrote:

> Try with tester.setExposeExceptions(false) before making the request to the
> secured page
>
> Martin Grigorov
> Wicket Training and Consulting
>
>
> On Wed, Feb 5, 2014 at 10:33 AM, Daniel Stoch <daniel.stoch@gmail.com
> >wrote:
>
> > Hi,
> >
> > I'm during migration from Wicket 1.4.x to 6.x and I have the following
> > problem with WicketTester.
> > I have some secured page, during its initialization some kind of
> > AuthorizationException is raised. It should end with displaying standard
> > AccessDeniedPage. Here is a code fragment from test case:
> >
> > 1.4.x:
> >     RequestCycle.get().setResponsePage(SecuredDummyPage.class);
> >     tester.processRequestCycle(requestCycle);
> >     Result result = tester.isRenderedPage(AccessDeniedPage.class);
> >     assertFalse(result.getMessage(), result.wasFailed());
> >
> > This test is passed.
> >
> > But in 6.13 the similar test:
> >     RequestCycle.get().setResponsePage(SecuredDummyPage.class);
> >     tester.processRequest();
> > // or tester.startPage(SecuredDummyPage.class)
> >     Result result = tester.isRenderedPage(AccessDeniedPage.class);
> >     assertFalse(result.getMessage(), result.wasFailed());
> >
> > is not passed. It is end up on this AuthorizationException and
> > AccessDeniedPage is not rendered.
> > Should it be rendered or should I have to change my test, because in 6.x
> it
> > works in different way?
> >
> > --
> > Daniel
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message