I think you missed the most important piece in there: WicketTester
Juergen
On 2/27/06, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> WicketTestCase is only 10 lines of actual code !?
> It hardly does anything more as the basic:
> application.setupRequestAndResponse();
> application.processRequestCycle();
>
> And about the other testcases in src/test, i hardly see them doing
> anything more as the same basic stuff, if they bother to do that at
> all. I see a lot of shortcuts being taken, for instance to test form
> submittal form.onsubmit is called. While there is nothing wrong with
> that. it kinda leaves people who want to test the entire cycle from
> httprequest to response without examples.
> Don't get me wrong, i'm glad with whatever code there is, but don't go
> telling people the solution to all there problems is in src/test.
>
> On a more cheerfull note i do appreciate what you have done in
> src/test as do i appreciate the time you take here to answer peoples
> questions.
>
> Maurice
>
> On 2/27/06, Juergen Donnerstag <[EMAIL PROTECTED]> wrote:
> > WicketTestCase might give you some hints as well. And src/test
> > contains plenty of test cases based on MockWebApplication
> >
> > Juergen
> >
> > On 2/27/06, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> > > For those interested in the answer.
> > > application.setupRequestAndResponse();
> > > application.getServletRequest().setParameter("wicket:bookmarkablePage",":"+PageB.class.getName());
> > > application.processRequestCycle();
> > > seems to do the trick.
> > >
> > > Maurice
> > >
> > > On 2/27/06, Maurice Marrink <[EMAIL PROTECTED]> wrote:
> > > > Hi, i am playing a bit with the mockwebapplication and have gotten it
> > > > to work so that it goes to the homepage. However now i would like it
> > > > to process the request for a bookmarkablepage. I tried this:
> > > > application.setupRequestAndResponse();
> > > > application.getServletRequest().setPath("/app);
> > > >
> > > > application.getServletRequest().setParameter("bookmarkablePage",PageB.class.getName());
> > > > application.processRequestCycle();
> > > > and
> > > > application.setupRequestAndResponse();
> > > >
> > > > application.getServletRequest().setPath("/app?bookmarkablePage="+PageB.class.getName());
> > > > application.processRequestCycle();
> > > >
> > > > stepping trough wicket i notice wicket does not know how to process
> > > > this request (it does not see the bookmarkablepage parameter).
> > > >
> > > > So obviously i am doing something wrong, i looked in the obvious
> > > > location for the junit test for wicket but the links package does not
> > > > manipulate the request like i am (except for the context).
> > > >
> > > > So if anybody could point me in the right direction that would be much
> > > > appreciated.
> > > >
> > > > Maurice
> > > >
> > >
> > >
> > > -------------------------------------------------------
> > > This SF.Net email is sponsored by xPML, a groundbreaking scripting
> > > language
> > > that extends applications into web and mobile media. Attend the live
> > > webcast
> > > and join the prime developer group breaking into this new coding
> > > territory!
> > > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > > _______________________________________________
> > > Wicket-develop mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/wicket-develop
> > >
> >
> >
> > -------------------------------------------------------
> > This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> > that extends applications into web and mobile media. Attend the live webcast
> > and join the prime developer group breaking into this new coding territory!
> > http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> > _______________________________________________
> > Wicket-develop mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/wicket-develop
> >
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking scripting language
> that extends applications into web and mobile media. Attend the live webcast
> and join the prime developer group breaking into this new coding territory!
> http://sel.as-us.falkag.net/sel?cmdlnk&kid0944&bid$1720&dat1642
> _______________________________________________
> Wicket-develop mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/wicket-develop
>
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Wicket-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-develop