public class InjectingAnnotationEngine extends Object implements AnnotationEngine
| Constructor and Description |
|---|
InjectingAnnotationEngine() |
| Modifier and Type | Method and Description |
|---|---|
Object |
createMockFor(Annotation annotation,
Field field)
Deprecated.
|
void |
injectMocks(Object testClassInstance)
Initializes mock/spies dependencies for objects annotated with
@InjectMocks for given testClassInstance.
|
void |
process(Class<?> clazz,
Object testInstance)
Process the fields of the test instance and create Mocks, Spies, Captors and inject them on fields
annotated @InjectMocks.
|
@Deprecated public Object createMockFor(Annotation annotation, Field field)
DefaultAnnotationEnginecreateMockFor in interface AnnotationEngineannotation - Annotationfield - Field detailsDefaultAnnotationEngine,
AnnotationEngine.createMockFor(java.lang.annotation.Annotation, java.lang.reflect.Field)public void process(Class<?> clazz, Object testInstance)
This code process the test class and the super classes.
process in interface AnnotationEngineclazz - Not usedtestInstance - The instance of the test, should not be null.AnnotationEngine.process(Class, Object)public void injectMocks(Object testClassInstance)
See examples in javadoc for MockitoAnnotations class.
testClassInstance - Test class, usually thisMockito, MIT License