Mats Henricson <m...@henricson.se> wrote on 08/09/2009 09:41:56:
> Mats Henricson wrote:
> > So, how should I inject my mocked @SessionState object? Is it
> > possible through the tester object, before I render the page?
> 
> I'm testing this now. Hopefully it is kosher:
> 
>   ApplicationStateManager stateManager =
>       tester.getRegistry().getService(ApplicationStateManager.class);
>   stateManager.set(GameUserState.class, myMockGameUserState);
>   tester.renderPage(...);

That looks sensible to me - and it does make sense to use a mock in that 
case.

Paul


---

This e-mail may contain confidential and/or privileged information. If you are 
not the intended recipient (or have received this e-mail in error) please 
notify the sender immediately and delete this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this e-mail is strictly forbidden.

Please refer to http://www.db.com/en/content/eu_disclosures.htm for additional 
EU corporate and regulatory disclosures.

Reply via email to