Thanks very much, it works! On Thu, Oct 22, 2009 at 6:17 PM, Martin Grigorov <[email protected]> wrote: > 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: [email protected] > For additional commands, e-mail: [email protected] > >
-- Many thanks! Haulyn Microproduction You can access me with the following ways: Location: Shandong Jinan Shumagang 6H-8, 250000 Mobile: +086-15864011231 email: [email protected], [email protected] website: http://haulynjason.net gtalk: [email protected] skype: saharabear QQ: 378606292 persional Twitter: http://twitter.com/saharabear persional Linkedin: http://www.linkedin.com/in/haulyn Haulyn Microproduction Twitter: http://twitter.com/haulynmp Haulyn Jason --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
