Package org.powermock.modules.testng
Class PowerMockObjectFactory
java.lang.Object
org.powermock.modules.testng.PowerMockObjectFactory
- All Implemented Interfaces:
org.testng.IObjectFactory,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.ObjectFactoryImpl -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate booleananyMethodInClassHasPowerMockAnnotation(Class<?> testClass) private booleanhasPowerMockAnnotation(Class<?> testClass) private booleanisClassAnnotatedWithPowerMockAnnotation(Class<?> testClass) newInstance(Constructor constructor, Object... params)
-
Field Details
-
powerMockObjectFactory
-
defaultObjectFactory
private org.testng.internal.ObjectFactoryImpl defaultObjectFactory
-
-
Constructor Details
-
PowerMockObjectFactory
public PowerMockObjectFactory()
-
-
Method Details
-
newInstance
- Specified by:
newInstancein interfaceorg.testng.IObjectFactory
-
hasPowerMockAnnotation
-
anyMethodInClassHasPowerMockAnnotation
-
isClassAnnotatedWithPowerMockAnnotation
-