<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What sort of unit test are you thinking of? The unit tests we do in Web Beans and the TCK run WB, so cause the injection to occur (do we need to provide a mock logger?!) - I though you used a similar thing in Seam...<div><br><div><div>On 29 May 2009, at 18:12, Dan Allen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Fri, May 29, 2009 at 10:00 AM, Pete Muir <span dir="ltr"><<a href="mailto:pmuir@bleepbleep.org.uk">pmuir@bleepbleep.org.uk</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;"> <div style="">Yeah, the split is un-obvious (esp due to naming), but we wanted a module we could use inside the RI, that didn't have the producer method on it....</div></blockquote><div><br>So I'm wondering, what should the standard signature of this injection be? Always a field injection (as opposed to a constructor injection)? What about access (package or private)?<br> <br>private @Logger Log log;<br><br>The reason I ask about access (and constructor injection) is because this could be the one pain in the side to unit testing a bean. Package access just makes it easier to inject a stub. What would be interesting is if the field could be seeded with a stub so that the logger just works in a unit test.<br> <br>private @Logger Log log = new NoOpLogImpl();<br><br>The injection would overwrite this value. Just an idea.<br><br>-Dan<br></div></div><br>-- <br>Dan Allen<br>Senior Software Engineer, Red Hat | Author of Seam in Action<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://in.relation.to/Bloggers/Dan">http://in.relation.to/Bloggers/Dan</a><br> <br>NOTE: While I make a strong effort to keep up with my email on a daily<br>basis, personal or other work matters can sometimes keep me away<br>from my email. If you contact me, but don't hear back for more than a week,<br> it is very likely that I am excessively backlogged or the message was<br>caught in the spam filters. Please don't hesitate to resend a message if<br>you feel that it did not reach my attention.<br> _______________________________________________<br>seam-dev mailing list<br><a href="mailto:seam-dev@lists.jboss.org">seam-dev@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/seam-dev<br></blockquote></div><br></div></body></html>