1 Reply Latest reply on Aug 16, 2016 8:34 AM by Martin Kouba

    Use WeldContainer to inject Beans and other dependencies into a Junit test?

    Bruce Springfield Apprentice

      Can I use the WeldContainer from Weld SE to inject Beans and other dependencies into a JUnit test?

       

      For instance:

       

          public <T> T getBean(final Class<T> clazz, final Annotation... qualifiers) {

                 return weldContainer.select(clazz, qualifiers).get();

          }