| Class and Description |
|---|
| MockBean
This custom
Bean implementation is useful for mocking. |
| MockBean.Builder
A builder instance should not be reused nor shared.
|
| MockBean.CreateFunction |
| MockBean.DestroyFunction |
| WeldInitiator
Test rule which starts a Weld container per each test method execution:
public class SimpleTest {
@Rule
public WeldInitiator weld = WeldInitiator.of(Foo.class);
@Test
public void testFoo() {
// Weld container is started automatically
// WeldInitiator can be used to perform programmatic lookup of beans
assertEquals("baz", weld.select(Foo.class).get().getBaz());
}
}
WeldInitiator implements Instance and therefore might be used to perform programmatic lookup of bean instances. |
| WeldInitiator.Builder
This builder can be used to customize the final
WeldInitiator instance, e.g. to activate a context for a given normal scope. |
Copyright © 2017. All rights reserved.