public class SpyOnInjectedFieldsHandler extends MockInjectionStrategy
The handler assumes that field initialization AND injection already happened. So if the field is still null, then nothing will happen there.
Constructor | Description |
---|---|
SpyOnInjectedFieldsHandler() |
Modifier and Type | Method | Description |
---|---|---|
protected boolean |
processInjection(java.lang.reflect.Field field,
java.lang.Object fieldOwner,
java.util.Set<java.lang.Object> mockCandidates) |
Process actual injection.
|
nop, process, thenTry
protected boolean processInjection(java.lang.reflect.Field field, java.lang.Object fieldOwner, java.util.Set<java.lang.Object> mockCandidates)
MockInjectionStrategy
Don't call this method directly, instead call MockInjectionStrategy.process(Field, Object, Set)
processInjection
in class MockInjectionStrategy
field
- Field needing injectionfieldOwner
- Field owner instance.mockCandidates
- Pool of mocks to inject.true
if injection occurred, false
otherwise