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 and Description |
---|
SpyOnInjectedFieldsHandler() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
processInjection(Field field,
Object fieldOwner,
Set<Object> mockCandidates)
Process actual injection.
|
nop, process, thenTry
protected boolean processInjection(Field field, Object fieldOwner, Set<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