While working on the final chapter of WIA I am writing about testing with
WicketTester.
I have the following example:
@Test public void labelContainsHelloWorldInFrench() {
WicketTester tester = new WicketTester();
tester.setupRequestAndResponse(); #1
tester.getWicketSession().setLocale(Locale.FRENCH); #2
tester.startPage(HelloWorld.class);
tester.assertLabel("message", "Bonjour tout le monde!");
}
Why is the tester.setupRequestAndResponse() call necessary (#1)? If I don't
call it, #2 will set the locale on a different session.
Martijn
--
Buy Wicket in Action: http://manning.com/dashorst
Apache Wicket 1.3.0-rc1 is released
Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.3.0-rc1/