You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2010/10/24 18:28:20 UTC
[jira] Commented: (WICKET-1215) WicketTester recreates session
after setting attributes on it
[ https://issues.apache.org/jira/browse/WICKET-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12924348#action_12924348 ]
Hudson commented on WICKET-1215:
--------------------------------
Integrated in Apache Wicket 1.5.x #451 (See [https://hudson.apache.org/hudson/job/Apache%20Wicket%201.5.x/451/])
WICKET-1215 WicketTester recreates session after setting attributes on it
Add a unit test for the described problem that WicketTester creates a new Session when starting a page.
> WicketTester recreates session after setting attributes on it
> -------------------------------------------------------------
>
> Key: WICKET-1215
> URL: https://issues.apache.org/jira/browse/WICKET-1215
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 1.4-M1
> Reporter: Martijn Dashorst
> Assignee: Martin Grigorov
> Fix For: 1.5-M3
>
>
> The following test for internationalization doesn't work, as rendering the page will create a new session.
> WicketTester tester = new WicketTester();
> tester.getWicketSession().setLocale(Locale.FRENCH);
> tester.startPage(HelloWorld.class);
> tester.assertLabel("message", "Bonjour tout le monde!");
> But setting up the response and request first works around recreating the session
> WicketTester tester = new WicketTester();
> tester.setupRequestAndResponse();
> tester.getWicketSession().setLocale(Locale.FRENCH);
> tester.startPage(HelloWorld.class);
> tester.assertLabel("message", "Bonjour tout le monde!");
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.