public class JavaEETestInjector extends Object implements Injector
Injector that performs additional injection on top of the injections that are standard available (e.g. entity manager in Java SE environment).
It works by first delegating to the default injector (typically CDI).
Afterwards it traverses the object graph of the injected object and performs
custom injection of test objects as specified by the Binding
class.
This approach makes sure that test dependencies also find their way into
objects that were created by the injection framework.
Constructor and Description |
---|
JavaEETestInjector(Class aClass,
List<Binding> aBindings,
Injector aDelegate)
Constructs the injector.
|
Modifier and Type | Method and Description |
---|---|
void |
inject(Object aComponent)
Injects beans into a given component of the required class.
|
Copyright © 2022. All rights reserved.