public interface AnnotationEngine
If you are interested then see implementations or source code of MockitoAnnotations.initMocks(Object)
Modifier and Type | Method and Description |
---|---|
Object |
createMockFor(Annotation annotation,
Field field)
Deprecated.
Please use
process(Class, Object) method instead that is more robust
Creates mock, ArgumentCaptor or wraps field instance in spy object. Only if of correct annotation type. |
void |
process(Class<?> clazz,
Object testInstance)
Allows extending the interface to perform action on specific fields on the test class.
|
@Deprecated Object createMockFor(Annotation annotation, Field field)
process(Class, Object)
method instead that is more robust
Creates mock, ArgumentCaptor or wraps field instance in spy object. Only if of correct annotation type.
annotation
- Annotationfield
- Field detailsvoid process(Class<?> clazz, Object testInstance)
See the implementation of this method to figure out what is it for.
clazz
- Class where to extract field information, check implementation for detailstestInstance
- Test instance