public class InjectMocksScanner
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.lang.Class<?> |
clazz |
Constructor and Description |
---|
InjectMocksScanner(java.lang.Class<?> clazz)
Create a new InjectMocksScanner for the given clazz on the given instance
|
Modifier and Type | Method and Description |
---|---|
void |
addTo(java.util.Set<java.lang.reflect.Field> mockDependentFields)
Add the fields annotated by @
InjectMocks |
private static void |
assertNoAnnotations(java.lang.reflect.Field field,
java.lang.Class<? extends java.lang.annotation.Annotation>... annotations) |
private java.util.Set<java.lang.reflect.Field> |
scan()
Scan fields annotated by @InjectMocks
|
public InjectMocksScanner(java.lang.Class<?> clazz)
clazz
- Current class in the hierarchy of the testpublic void addTo(java.util.Set<java.lang.reflect.Field> mockDependentFields)
InjectMocks
mockDependentFields
- Set of fields annotated by @InjectMocks
private java.util.Set<java.lang.reflect.Field> scan()
private static void assertNoAnnotations(java.lang.reflect.Field field, java.lang.Class<? extends java.lang.annotation.Annotation>... annotations)