public abstract class AbstractTestSuiteChunkerImpl<T> extends AbstractCommonTestSuiteChunkerImpl implements RunnerTestSuiteChunker
PrepareForTest
annotation and whichever test-method
annotation the actual implementation-class specifies by overriding the
method AbstractCommonTestSuiteChunkerImpl.testMethodAnnotation()
. This to make sure that you
can byte-code manipulate classes in tests without impacting on other tests.Modifier and Type | Field and Description |
---|---|
protected List<T> |
delegates |
protected Set<Class<?>> |
delegatesCreatedForTheseClasses |
protected int |
testCount |
NOT_INITIALIZED
Modifier | Constructor and Description |
---|---|
protected |
AbstractTestSuiteChunkerImpl(Class<?>... testClasses) |
protected |
AbstractTestSuiteChunkerImpl(Class<?> testClass) |
Modifier and Type | Method and Description |
---|---|
protected abstract T |
createDelegatorFromClassloader(ClassLoader classLoader,
Class<?> testClass,
List<Method> methodsToTest) |
void |
createTestDelegators(Class<?> testClass,
List<TestChunk> chunks)
Create the test delegators needed for a whole class.
|
int |
getDelegatorIndex(int testIndex)
Get the junit runner delegate that handles the test at index
testIndex . |
int |
getInternalTestIndex(int originalTestIndex)
Get the internal test index for a junit runner delegate based on the
"real" original test index.
|
protected Object |
getPowerMockTestListenersLoadedByASpecificClassLoader(Class<?> clazz,
ClassLoader classLoader) |
protected Class<?>[] |
getTestClasses() |
getChunkSize, getTestChunk, getTestChunks, getTestChunksEntries, testMethodAnnotation
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getTestCount
getChunkSize, getTestChunk, getTestChunks, getTestChunksEntries, shouldExecuteTestForMethod
protected AbstractTestSuiteChunkerImpl(Class<?> testClass) throws Exception
Exception
protected Object getPowerMockTestListenersLoadedByASpecificClassLoader(Class<?> clazz, ClassLoader classLoader)
public final void createTestDelegators(Class<?> testClass, List<TestChunk> chunks) throws Exception
RunnerTestSuiteChunker
createTestDelegators
in interface RunnerTestSuiteChunker
Exception
protected abstract T createDelegatorFromClassloader(ClassLoader classLoader, Class<?> testClass, List<Method> methodsToTest) throws Exception
Exception
public int getInternalTestIndex(int originalTestIndex)
originalTestIndex
- The original test index as seen by the test runner.-1
if no index was found.public int getDelegatorIndex(int testIndex)
testIndex
. Throws a RuntimeException
if a delegator
is not found for the specific test index.testIndex
- The test index that a delegator should hold.protected Class<?>[] getTestClasses()
Copyright © 2019. All rights reserved.