Hallo,
I think it should work with one of those methods:
public final Page startPage(final ITestPageSource testPageSource)
public final Page startPage(final Page page)
instead of wicketTester.startPage(FooPage.class);
and also you should use wicket tester's request for adding cookies:
wicketTester.getServletRequest()
have not tried it though.
Vitek
Peter Gardfjell wrote:
Hi all,
does anyone know of some easy way of adding cookies to WicketTester prior to
having it visit page?
That is something along the line of
WicketTester wicketTester = new WicketTester(new
MyApplication());
Cookie cookie = new Cookie("name", "value");
/*
... insert code for adding cookie to request here ...
*/
wicketTester.startPage(FooPage.class);
wicketTester.assertRenderedPage(FooPage.class);
regards, Peter
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]