<div>I just commited some code that change the injection done in TestCore to use Non-Contextual-Injection. This should fix the issues your having.</div><div><br></div><div><a href="https://jira.jboss.org/jira/browse/WELDX-63">https://jira.jboss.org/jira/browse/WELDX-63</a></div>
<div><br></div><div>Do remember that Weld-Test will be &#39;replaced&#39; by Arquillian, so don&#39;t put to much work into it.. :)</div><div><br></div><div>-aslak-</div><br><div class="gmail_quote">2009/12/27 Johan Eltes <span dir="ltr">&lt;<a href="mailto:johan.eltes@callistaenterprise.se">johan.eltes@callistaenterprise.se</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word">org.jboss.weld.test.core.TestCore is used by the org.jboss.weld.test.junit.CDIRunner to inject the dependencies of the test case. However, it only supports injection of qualified fields. As a side effect, dependencies declared as concrete classes can not be injected, since qualifiers only make sense to interface/abstract dependency declarations:<br>
<br>package org.jboss.weld.test.core;<br>...<br><br>public class TestCore {<br>...<br> private void injectField(Field field, Object target) throws Exception<br>   {<br><font size="3"><span style="font-size:12px"><b>      if (!hasBindTypeAnnotation(field.getAnnotations()))<br>
      {<br>         return;<br>      }</b></span></font><br>      if (!field.isAccessible())<br>      {<br>         field.setAccessible(true);<br>      }<br>      Object injectable = getInstanceByType(field.getType(), field<br>
            .getAnnotations());<br><br>      if (injectable != null)<br>      {<br>         field.set(target, injectable);<br>      }<br>   }<div><br></div><div>Just wondering the value of this restriction?</div><div><br>
</div><font color="#888888"><div>/Johan</div></font></div><br>_______________________________________________<br>
weld-dev mailing list<br>
<a href="mailto:weld-dev@lists.jboss.org">weld-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/weld-dev" target="_blank">https://lists.jboss.org/mailman/listinfo/weld-dev</a><br></blockquote></div><br><br clear="all"><br>-- <br>--<br>Aslak Knutsen; +47 952 38 791; fax +47 22 33 60 24<br>
Kongens gate 14; Boks 805 Sentrum, 0104 Oslo;<br><a href="http://www.conduct.no">http://www.conduct.no</a>; mailto:<a href="mailto:aslak@conduct.no">aslak@conduct.no</a><br><br>Conduct AS - Professional Open Source Services<br>
- Red Hat/JBoss Premier System Integrator<br>- Pentaho Preferred Integration Partner<br>- Atlassian Technology Partner<br>