No I hadn't!  ..... but I have now! Thanks so much.

If I had made a constructor that took PageParameters parameter I would have
obviously tried that but I never thought to look at the WebPage class and
see that there is a contructor: WebPage(PageParameters ) which you can
override.

Man that's made my testing a lot more simple now.

Thanks again
Simon

On 12/09/2007, cwilkes <[EMAIL PROTECTED]> wrote:
>
>
>
> wicket user wrote:
> >
> > 1) I've got a page that gets hit by an outside credit card merchant once
> > they have validated the card, they post me my transaction ID along with
> a
> > whole host of other parameters. Getting them from the request is easy in
> > the
> > page itself but trying to unit test it is driving me nuts. Basically I
> > want
> > to start the page with parameters already loaded, it has to be staring
> me
> > in
> > the face but I haven't had any luck.
> >
>
> Have you tried someething like this?
>
> PageParameters pageParameters = new PageParameters();
> pageParameters.add("userId", "1234");
> wicketTester.startPage(new ITestPageSource() {
>             public Page getTestPage() {
>                 return new MyPage(pageParameters);
>         });
>     }
> --
> View this message in context:
> http://www.nabble.com/WicketTester-and-Page-parameters---Wicket-Example-Unit-tests--tf4424879.html#a12638428
> Sent from the Wicket - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

Reply via email to