public class AnnotationEnabler
extends org.powermock.core.spi.support.AbstractPowerMockTestListenerBase
implements org.powermock.core.spi.listener.AnnotationEnablerListener
Mock
,
Mock
or 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(java.lang.Object testInstance,
java.lang.reflect.Method method,
java.lang.Object[] arguments) |
java.lang.Class<? extends java.lang.annotation.Annotation>[] |
getMockAnnotations() |
afterTestMethod, afterTestSuiteEnded, beforeTestSuiteStarted
public void beforeTestMethod(java.lang.Object testInstance, java.lang.reflect.Method method, java.lang.Object[] arguments) throws java.lang.Exception
beforeTestMethod
in interface org.powermock.core.spi.PowerMockTestListener
beforeTestMethod
in class org.powermock.core.spi.support.AbstractPowerMockTestListenerBase
java.lang.Exception
public java.lang.Class<? extends java.lang.annotation.Annotation>[] getMockAnnotations()
getMockAnnotations
in interface org.powermock.core.spi.listener.AnnotationEnablerListener