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(java.lang.reflect.Field field,
java.lang.Object fieldOwner,
java.util.Set<java.lang.Object> mockCandidates)
Process actual injection.
|
nop, process, thenTryprotected 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 MockInjectionStrategyfield - Field needing injectionfieldOwner - Field owner instance.mockCandidates - Pool of mocks to inject.true if injection occurred, false otherwise