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

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

    brucespringfield

      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();

          }