Package org.powermock.tests.utils.impl
Class AbstractCommonTestSuiteChunkerImpl
- java.lang.Object
-
- org.powermock.tests.utils.impl.AbstractCommonTestSuiteChunkerImpl
-
- All Implemented Interfaces:
TestSuiteChunker
- Direct Known Subclasses:
AbstractTestSuiteChunkerImpl,PowerMockRuleTestSuiteChunker
public abstract class AbstractCommonTestSuiteChunkerImpl extends Object implements TestSuiteChunker
-
-
Field Summary
Fields Modifier and Type Field Description protected static intDEFAULT_TEST_LISTENERS_SIZEprotected static intINTERNAL_INDEX_NOT_FOUNDprotected static intNOT_INITIALIZEDprotected LinkedHashMap<Integer,List<Integer>>testAtDelegateMapperprotected Class<?>[]testClasses
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractCommonTestSuiteChunkerImpl(Class<?> testClass)protectedAbstractCommonTestSuiteChunkerImpl(Class<?>... testClasses)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidchunkClass(Class<?> testClass)intgetChunkSize()Get the number of chunks defined in this suite.protected org.powermock.tests.utils.impl.MockClassLoaderFactorygetMockClassLoaderFactory(Class<?> testClass, String[] preliminaryClassesToLoadByMockClassloader, String[] packagesToIgnore, MockTransformer[] extraMockTransformers)TestChunkgetTestChunk(Method method)Get TestChunk for the given method.List<TestChunk>getTestChunks()Get all chunk entries.List<TestChunk>getTestChunksEntries(Class<?> testClass)Get all chunk entries for a specific class.protected voidregisterProxyframework(ClassLoader classLoader)protected Class<? extends Annotation>testMethodAnnotation()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.powermock.tests.utils.TestSuiteChunker
shouldExecuteTestForMethod
-
-
-
-
Field Detail
-
DEFAULT_TEST_LISTENERS_SIZE
protected static final int DEFAULT_TEST_LISTENERS_SIZE
- See Also:
- Constant Field Values
-
NOT_INITIALIZED
protected static final int NOT_INITIALIZED
- See Also:
- Constant Field Values
-
INTERNAL_INDEX_NOT_FOUND
protected static final int INTERNAL_INDEX_NOT_FOUND
- See Also:
- Constant Field Values
-
testAtDelegateMapper
protected final LinkedHashMap<Integer,List<Integer>> testAtDelegateMapper
-
testClasses
protected final Class<?>[] testClasses
-
-
Method Detail
-
getChunkSize
public int getChunkSize()
Description copied from interface:TestSuiteChunkerGet the number of chunks defined in this suite.- Specified by:
getChunkSizein interfaceTestSuiteChunker- Returns:
- The number of chunks defined in the correct suite.
-
getTestChunks
public List<TestChunk> getTestChunks()
Description copied from interface:TestSuiteChunkerGet all chunk entries.- Specified by:
getTestChunksin interfaceTestSuiteChunker- Returns:
- An set of entries that contains a list of methods contained in the chunk and the class loader that loaded these methods.
-
getTestChunksEntries
public List<TestChunk> getTestChunksEntries(Class<?> testClass)
Get all chunk entries for a specific class.- Specified by:
getTestChunksEntriesin interfaceTestSuiteChunker- Parameters:
testClass- The class whose chunk entries to get.- Returns:
- An set of entries that contains a list of methods contained in the chunk for the specific test class and the class loader that loaded these methods.
-
getTestChunk
public TestChunk getTestChunk(Method method)
Description copied from interface:TestSuiteChunkerGet TestChunk for the given method.- Specified by:
getTestChunkin interfaceTestSuiteChunker- Parameters:
method- - method for which test chunk should be found.- Returns:
- TestChunk for this method.
-
registerProxyframework
protected void registerProxyframework(ClassLoader classLoader)
-
getMockClassLoaderFactory
protected org.powermock.tests.utils.impl.MockClassLoaderFactory getMockClassLoaderFactory(Class<?> testClass, String[] preliminaryClassesToLoadByMockClassloader, String[] packagesToIgnore, MockTransformer[] extraMockTransformers)
-
testMethodAnnotation
protected Class<? extends Annotation> testMethodAnnotation()
-
-