Class InjectMocksScanner
java.lang.Object
org.mockito.internal.configuration.injection.scanner.InjectMocksScanner
Scan field for injection.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInjectMocksScanner(Class<?> clazz) Create a new InjectMocksScanner for the given clazz on the given instance -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd the fields annotated by @InjectMocksprivate static voidassertNoAnnotations(Field field, Class<? extends Annotation>... annotations) scan()Scan fields annotated by @InjectMocks
-
Field Details
-
clazz
-
-
Constructor Details
-
InjectMocksScanner
Create a new InjectMocksScanner for the given clazz on the given instance- Parameters:
clazz- Current class in the hierarchy of the test
-
-
Method Details
-
addTo
Add the fields annotated by @InjectMocks- Parameters:
mockDependentFields- Set of fields annotated by @InjectMocks
-
scan
-
assertNoAnnotations
-