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 java.util.List<T> |
delegates |
protected java.util.Set<java.lang.Class<?>> |
delegatesCreatedForTheseClasses |
protected int |
testCount |
NOT_INITIALIZED| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTestSuiteChunkerImpl(java.lang.Class<?>... testClasses) |
protected |
AbstractTestSuiteChunkerImpl(java.lang.Class<?> testClass) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
createDelegatorFromClassloader(java.lang.ClassLoader classLoader,
java.lang.Class<?> testClass,
java.util.List<java.lang.reflect.Method> methodsToTest) |
void |
createTestDelegators(java.lang.Class<?> testClass,
java.util.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 java.lang.Object |
getPowerMockTestListenersLoadedByASpecificClassLoader(java.lang.Class<?> clazz,
java.lang.ClassLoader classLoader) |
protected java.lang.Class<?>[] |
getTestClasses() |
getChunkSize, getTestChunk, getTestChunks, getTestChunksEntries, testMethodAnnotationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetTestCountgetChunkSize, getTestChunk, getTestChunks, getTestChunksEntries, shouldExecuteTestForMethodprotected final java.util.Set<java.lang.Class<?>> delegatesCreatedForTheseClasses
protected final java.util.List<T> delegates
protected volatile int testCount
protected AbstractTestSuiteChunkerImpl(java.lang.Class<?> testClass)
throws java.lang.Exception
java.lang.Exceptionprotected AbstractTestSuiteChunkerImpl(java.lang.Class<?>... testClasses)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.Object getPowerMockTestListenersLoadedByASpecificClassLoader(java.lang.Class<?> clazz,
java.lang.ClassLoader classLoader)
public final void createTestDelegators(java.lang.Class<?> testClass,
java.util.List<TestChunk> chunks)
throws java.lang.Exception
RunnerTestSuiteChunkercreateTestDelegators in interface RunnerTestSuiteChunkerjava.lang.Exceptionprotected abstract T createDelegatorFromClassloader(java.lang.ClassLoader classLoader, java.lang.Class<?> testClass, java.util.List<java.lang.reflect.Method> methodsToTest) throws java.lang.Exception
java.lang.Exceptionpublic 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 java.lang.Class<?>[] getTestClasses()