Class PrepareForTestExtractorImpl
java.lang.Object
org.powermock.tests.utils.impl.AbstractTestClassExtractor
org.powermock.tests.utils.impl.PrepareForTestExtractorImpl
- All Implemented Interfaces:
TestClassesExtractor
Implementation of the
TestClassesExtractor interface that extract
classes from the PrepareForTest or PrepareOnlyThisForTest
annotations. It also adds the test case to the array of classes that should
be modified.-
Field Summary
Fields inherited from class AbstractTestClassExtractor
includeMethods -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddClassHierarchy(Set<String> all, Class<?> classToMock) private voidaddFullyQualifiedNames(Set<String> all, String[] fullyQualifiedNames) private voidaddFullyQualifiedNames(Set<String> all, PrepareForTest annotation) private voidaddFullyQualifiedNames(Set<String> all, PrepareOnlyThisForTest annotation) private voidaddInnerClassesAndInterfaces(Set<String> all, Class<?> classToMock) private voidaddTestCase(Set<String> all, AnnotatedElement element) protected String[]getClassesToModify(AnnotatedElement element) Get the fully qualified names for classes that must should be modified for thiselement.Methods inherited from class AbstractTestClassExtractor
getTestClasses, isPrepared
-
Constructor Details
-
PrepareForTestExtractorImpl
public PrepareForTestExtractorImpl() -
PrepareForTestExtractorImpl
public PrepareForTestExtractorImpl(boolean includeMethods)
-
-
Method Details
-
getClassesToModify
Description copied from class:AbstractTestClassExtractorGet the fully qualified names for classes that must should be modified for thiselement.- Specified by:
getClassesToModifyin classAbstractTestClassExtractor- Parameters:
element- The element that may contain info regarding which classes that must be modified by PowerMock.- Returns:
- An array of fully-qualified names to classes that must be
modified by PowerMock for the specific
element.
-
addTestCase
-
addFullyQualifiedNames
-
addFullyQualifiedNames
-
addFullyQualifiedNames
-
addClassHierarchy
-
addInnerClassesAndInterfaces
-