You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wicket.apache.org by Juergen Donnerstag <ju...@gmail.com> on 2006/12/01 07:59:32 UTC

Re: WicketTester cannot test applications with custom WebRequestCycle

I applied the patch yesterday but didn't want to commit it (yet) as in
2.0 still quite some junit tests are failing. They should be fixed
first to avoid side effects.

Juergen

On 11/30/06, Frank Bille <fr...@gmail.com> wrote:
> Thank you
>
> Frank
>
> On 11/30/06, Martin Benda <be...@bendis.cz> wrote:
> >
> > Ok, I've created a new issue and attached patches for 2.0 and 1.x - see
> > JIRA:
> > http://issues.apache.org/jira/browse/WICKET-129
> >
> > Bendis
> >
> > Dne čtvrtek 30 listopad 2006 14:27 Frank Bille napsal(a):
> > > That sounds fair enough. Can you please attach your patch to JIRA so we
> > > don't forget it?
> > >
> > > Frank
> > >
> > > On 11/30/06, Martin Benda <be...@bendis.cz> wrote:
> > > > Hi,
> > > >
> > > > I ran into problems when I tried to write some unit tests using
> > > > WicketTester
> > > > to test my application: The application creates its own RequestCycle
> > > > which extends WebRequestCycle (by overriding
> > > > WebApplication#getRequestCycleFactory). But when testing the
> > application
> > > > inside the WicketTester, RequestCycle is always WebRequestCycle, not
> > the
> > > > one
> > > > created by the factory.
> > > >
> > > > The problem is IMO in the MockWebApplication class - it creates
> > request
> > > > cycles
> > > > by "new WebRequestCycle(...)" - shouldn't it use
> > > > Session#getRequestCycleFactory#newRequestCycle(...) instead?
> > > >
> > > > The attached patch solves this problem - at least for me :-)
> > > >
> > > > P.S.: The patch was created for wicket-2.0 trunk.
> > > >
> > > > Bendis
> >
>