Package org.jboss.weld.junit5
Annotation Type EnableWeld
-
@Retention(RUNTIME) @Target({TYPE,METHOD}) @Documented @Inherited @ExtendWith(WeldJunit5Extension.class) public @interface EnableWeld
Meta-annotation that allows test classes to be extended with@EnableWeld
instead of@ExtendWith(WeldJunit5Extension.class)
.
@EnableWeld public class SimpleTest { // Injected automatically @Inject Foo foo; @Test public void testFoo() { // Weld container is started automatically assertEquals("baz", foo.getBaz()); } }- Author:
- Steve Moyer
- See Also:
WeldJunit5Extension