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 AnnotationEngine
public void process(Class<?> context, Object testClass)
AnnotationEngine
See the implementation of this method to figure out what is it for
process
in interface AnnotationEngine
public void injectMocks(Object testClass)
See examples in javadoc for MockitoAnnotations
class.
testClass
- Test class, usually this
Copyright © 2018. All rights reserved.