That just seems to me like the opposite of what we are trying to achieve with injection.<br><br>I would argue against HttpSession and request (I'm assuming ServletRequest) because that is the point of FacesContext...to abstract that away somewhat. But you still need FacesContext.<br>
<br>-Dan<br><br><div class="gmail_quote">On Tue, Nov 10, 2009 at 4:51 PM, Gavin King <span dir="ltr"><<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Call FacesContext.setCurrentInstance() :-)<br>
<div><div></div><div class="h5"><br>
On Tue, Nov 10, 2009 at 4:29 PM, Steven Boscarine<br>
<<a href="mailto:steven.boscarine@childrens.harvard.edu">steven.boscarine@childrens.harvard.edu</a>> wrote:<br>
><br>
> Gavin King wrote:<br>
>><br>
>> I didn't put it in, since I figured it was hard to justify that this<br>
>> is better than FacesContext.getCurrentInstance().<br>
>><br>
><br>
> How would one unit test a class that has such a call?<br>
><br>
><br>
><br>
<br>
<br>
<br>
</div></div><div><div></div><div class="h5">--<br>
Gavin King<br>
<a href="mailto:gavin.king@gmail.com">gavin.king@gmail.com</a><br>
<a href="http://in.relation.to/Bloggers/Gavin" target="_blank">http://in.relation.to/Bloggers/Gavin</a><br>
<a href="http://hibernate.org" target="_blank">http://hibernate.org</a><br>
<a href="http://seamframework.org" target="_blank">http://seamframework.org</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<br>Registered Linux User #231597<br><br><a href="http://mojavelinux.com">http://mojavelinux.com</a><br>
<a href="http://mojavelinux.com/seaminaction">http://mojavelinux.com/seaminaction</a><br><a href="http://www.google.com/profiles/dan.j.allen">http://www.google.com/profiles/dan.j.allen</a><br>