public class InjectingAnnotationEngine extends Object implements AnnotationEngine
| Constructor and Description |
|---|
InjectingAnnotationEngine() |
| Modifier and Type | Method and Description |
|---|---|
Object |
createMockFor(Annotation annotation,
Field field) |
void |
injectMocks(Object testClass)
Initializes mock/spies dependencies for objects annotated with
@InjectMocks for given testClass.
|
void |
process(Class<?> context,
Object testClass)
Allows extending the interface to perform action on specific fields on the test class
|
public Object createMockFor(Annotation annotation, Field field)
createMockFor in interface AnnotationEnginepublic void process(Class<?> context, Object testClass)
AnnotationEngineSee the implementation of this method to figure out what is it for
process in interface AnnotationEnginepublic void injectMocks(Object testClass)
See examples in javadoc for MockitoAnnotations class.
testClass - Test class, usually thisCopyright © 2018. All rights reserved.