You are correct, I omitted it, due to it being done in the superclass, but tester.startPage(ProgramPage.class) is def being called
Mr Mean wrote: > > Do you do tester.startPage(ProgramPage.class) before you use the > FormTester? > You should get a different error if you didn't but i don't see where > you tell wicket which page to load, so i am just checking. > > Maurice > > On Fri, May 2, 2008 at 6:14 PM, iwessels <[EMAIL PROTECTED]> wrote: >> >> Hello all, >> >> I am trying to write a test case to simulate that when the user clicks >> on a >> button, they are navigated to a new page. >> >> // Test Case >> public void testProgramPageNavigation() { >> WicketTester tester = new WicketTester(); >> FormTester formTester = tester.newFormTester("programForm"); >> formTester.submit("programButton"); >> >> // this line fails (expected NewProgramPage but was ProgramPage) >> tester.assertRenderedPage(NewProgramPage.class); >> } >> >> // Program Page >> public class ProgramPage extends WebPage { >> >> public ProgramPage() { >> Form programForm = new Form("programForm"); >> >> programForm.add(new Button("programButton") { >> public void onSubmit() { >> setReponsePage(NewProgramPage.class); >> } >> } >> >> add(programForm); >> >> } >> } >> >> Any help would be much appreciated >> >> -- >> View this message in context: >> http://www.nabble.com/Wicket-%3A-Navigation-Test-Case-Failure-tp17022776p17022776.html >> Sent from the Wicket - User mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- View this message in context: http://www.nabble.com/Wicket-%3A-Navigation-Test-Case-Failure-tp17022776p17022970.html Sent from the Wicket - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]