I'm a wicket newbie,
but this was in the javadoc for WicketTester (also your constructor name
'kisspage' doesn't match your class name 'mypage'):
//test code
public void testRenderYourPage()
{
// provide page instance source for WicketTester
tester.startPage(new TestPageSource()
{
public Page getTestPage()
{
return new YourPage("mock message");
}
});
tester.assertRenderedPage(YourPage.class);
tester.assertLabel("yourMessage", "mock message");
// assert feedback messages in INFO Level
tester.assertInfoMessages(new String[] { "Wicket Rocks ;-)" });
}
Instead of tester.startPage(pageClass), we define a ITestPageSource to
provide testing page instance for WicketTester. This is necessary because
YourPage uses a custom constructor, which is very common for transfering
model data, can not be instansiated by reflection. Finally, we use
assertInfoMessages to assert there is a feedback message "Wicket Rocks ;-)"
in INFO level. TODO General: Example usage of FormTester
--
View this message in context:
http://www.nabble.com/Passing-parameters-to-a-page-in-WicketTester-tf4111196.html#a11690441
Sent from the Wicket - User mailing list archive at Nabble.com.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wicket-user