Annotation Interface EnableAutoWeld


@Retention(RUNTIME) @Target({TYPE,METHOD}) @Documented @Inherited @ExtendWith(WeldJunit5AutoExtension.class) public @interface EnableAutoWeld
Meta-annotation that allows test classes to be extended with @EnableAutoWeld instead of @ExtendWith(WeldJunit5AutoExtension.class).
 
@EnableAutoWeld public class SimpleTest { // Injected automatically @Inject Foo foo; @Test public void testFoo() { // Weld container is started automatically assertEquals("baz", foo.getBaz()); } }
See Also: