public class JavaEETestInjector extends Object implements org.wamblee.inject.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,
org.wamblee.inject.Injector aDelegate)
Constructs the injector.
|
public JavaEETestInjector(Class aClass, List<Binding> aBindings, org.wamblee.inject.Injector aDelegate)
aClass
- Class to inject for.aBindings
- Binding of an object value.aDelegate
- Injecto to delegate to to perform the standard injections.public void inject(Object aComponent)
inject
in interface org.wamblee.inject.Injector
Copyright © 2022. All rights reserved.