Class AnnotationEnabler

java.lang.Object
org.powermock.core.spi.support.AbstractPowerMockTestListenerBase
org.powermock.api.extension.listener.AnnotationEnabler
All Implemented Interfaces:
AnnotationEnablerListener, PowerMockTestListener
Direct Known Subclasses:
AnnotationEnabler, AnnotationEnabler

public class AnnotationEnabler extends AbstractPowerMockTestListenerBase implements AnnotationEnablerListener

Before each test method all fields annotated with Mock, Mock, Mock MockNice or MockStrict will have mock objects created for them and injected to the fields.

Also all fields annotated with TestSubject will be processed and mocks are injected to fields object, if these fields not null.

It will only inject to fields that haven't been set before (i.e that are null).

See Also:
  • Mock
  • Mock
  • TestSubject