public class AnnotationEnabler
extends org.powermock.core.spi.support.AbstractPowerMockTestListenerBase
implements org.powermock.core.spi.listener.AnnotationEnablerListener
MockitoAnnotations.Mock,
Mock or MockitoAnnotations.Mock have mock objects created for them
and injected to the fields. It will also delegate to a special implementation
of the InjectingAnnotationEngine in Mockito which inject's spies,
captors etc.
It will only inject to fields that haven't been set before (i.e that are
null).| Constructor and Description |
|---|
AnnotationEnabler() |
| Modifier and Type | Method and Description |
|---|---|
void |
beforeTestMethod(Object testInstance,
Method method,
Object[] arguments) |
Class<? extends Annotation>[] |
getMockAnnotations() |
afterTestMethod, afterTestSuiteEnded, beforeTestSuiteStartedpublic void beforeTestMethod(Object testInstance, Method method, Object[] arguments) throws Exception
beforeTestMethod in interface org.powermock.core.spi.PowerMockTestListenerbeforeTestMethod in class org.powermock.core.spi.support.AbstractPowerMockTestListenerBaseExceptionpublic Class<? extends Annotation>[] getMockAnnotations()
getMockAnnotations in interface org.powermock.core.spi.listener.AnnotationEnablerListenerCopyright © 2007–2016. All rights reserved.