El jue, 22-10-2009 a las 17:07 +0800, Haulyn R. Jason escribió: > Hi, all: > > I have a page which is protected by MySession.isLogin(). > > I want to unit test this page and write the following code: > > ----------------------------------------------------------------------------------------------------------- > WicketTester tester = new WicketTester(new WebsiteApplication()); > > tester.createRequestCycle(); > tester.setupRequestAndResponse(); put a User in the Session here and then isLogin() will pass > tester.startPage(GmailImportPage.class); > > WebsiteSession session = (WebsiteSession)tester.getWicketSession(); > Member m = new Member(); > m.setId(2); > session.setMember(m); > > tester.assertRenderedPage(GmailImportPage.class); > ----------------------------------------------------------------------------------------------------------- > But, the result is: expected: <GmailImportPage> but was <IndexPage> > > that right, IndexPage is my Index Page setting by WebsiteApplication, > I think maybe I lost some steps, can anybody help me? > > Thanks. > > >
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org