I just commited some code that change the injection done in TestCore to use
Non-Contextual-Injection. This should fix the issues your having.
https://jira.jboss.org/jira/browse/WELDX-63
Do remember that Weld-Test will be 'replaced' by Arquillian, so don't put to
much work into it.. :)
-aslak-
2009/12/27 Johan Eltes <johan.eltes(a)callistaenterprise.se>
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:
package org.jboss.weld.test.core;
...
public class TestCore {
...
private void injectField(Field field, Object target) throws Exception
{
* if (!hasBindTypeAnnotation(field.getAnnotations()))
{
return;
}*
if (!field.isAccessible())
{
field.setAccessible(true);
}
Object injectable = getInstanceByType(field.getType(), field
.getAnnotations());
if (injectable != null)
{
field.set(target, injectable);
}
}
Just wondering the value of this restriction?
/Johan
_______________________________________________
weld-dev mailing list
weld-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/weld-dev
--
--
Aslak Knutsen; +47 952 38 791; fax +47 22 33 60 24
Kongens gate 14; Boks 805 Sentrum, 0104 Oslo;
http://www.conduct.no; mailto:aslak@conduct.no
Conduct AS - Professional Open Source Services
- Red Hat/JBoss Premier System Integrator
- Pentaho Preferred Integration Partner
- Atlassian Technology Partner