Package org.powermock.modules.testng
Class PowerMockObjectFactory
java.lang.Object
org.powermock.modules.testng.PowerMockObjectFactory
- All Implemented Interfaces:
org.testng.ITestObjectFactory
The PowerMock object factory. If the test class or any public method declared in the test class is annotated with
PrepareForTest
or SuppressStaticInitializationFor
the PowerMock classloader will enable the class
for PowerMock testing, otherwise a standard ObjectFactory is used.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.testng.internal.objects.DefaultTestObjectFactory
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
anyMethodInClassHasPowerMockAnnotation
(Class<?> testClass) private boolean
hasPowerMockAnnotation
(Class<?> testClass) private boolean
isClassAnnotatedWithPowerMockAnnotation
(Class<?> testClass) newInstance
(Constructor constructor, Object... params) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.testng.ITestObjectFactory
newInstance, newInstance
-
Field Details
-
powerMockObjectFactory
-
defaultObjectFactory
private org.testng.internal.objects.DefaultTestObjectFactory defaultObjectFactory
-
-
Constructor Details
-
PowerMockObjectFactory
public PowerMockObjectFactory()
-
-
Method Details
-
newInstance
- Specified by:
newInstance
in interfaceorg.testng.ITestObjectFactory
-
hasPowerMockAnnotation
-
anyMethodInClassHasPowerMockAnnotation
-
isClassAnnotatedWithPowerMockAnnotation
-