public class JUnit3TestSuiteChunkerImpl extends AbstractTestSuiteChunkerImpl<PowerMockJUnit3RunnerDelegate> implements JUnit3TestSuiteChunker
delegates, delegatesCreatedForTheseClasses, NOT_INITIALIZED, prepareForTestExtractor, suppressionExtractor, testAtDelegateMapper, testCount
Constructor and Description |
---|
JUnit3TestSuiteChunkerImpl(Class<? extends junit.framework.TestCase>... testClasses) |
JUnit3TestSuiteChunkerImpl(String name,
Class<? extends junit.framework.TestCase>... testClasses) |
Modifier and Type | Method and Description |
---|---|
void |
addTest(junit.framework.Test test) |
void |
addTestClassToSuite(Class<?> clazz)
Add a class to the test suite.
|
void |
addTestSuite(Class<? extends junit.framework.TestCase> testClass) |
protected void |
chunkClass(Class<?> testClass) |
int |
countTestCases() |
protected PowerMockJUnit3RunnerDelegate |
createDelegatorFromClassloader(ClassLoader classLoader,
Class<?> testClass,
List<Method> methodsToTest) |
int |
getTestCount()
Get the number of total tests defined in the suite (the sum of all tests
defined in all chunks for this suite).
|
void |
run(junit.framework.TestResult result) |
void |
runTest(junit.framework.Test test,
junit.framework.TestResult result) |
boolean |
shouldExecuteTestForMethod(Class<?> testClass,
Method potentialTestMethod)
Should reflect whether or not this method is eligible for testing.
|
junit.framework.Test |
testAt(int index) |
Enumeration<?> |
tests() |
createNewClassloader, createTestDelegators, getChunkSize, getDelegatorIndex, getInternalTestIndex, getPowerMockTestListenersLoadedByASpecificClassLoader, getTestChunks, getTestChunksEntries, getTestClasses, hasMockPolicyProvidedClasses
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
createNewClassloader, createTestDelegators, getChunkSize, getTestChunks, getTestChunksEntries
public JUnit3TestSuiteChunkerImpl(Class<? extends junit.framework.TestCase>... testClasses) throws Exception
Exception
protected PowerMockJUnit3RunnerDelegate createDelegatorFromClassloader(ClassLoader classLoader, Class<?> testClass, List<Method> methodsToTest) throws Exception
createDelegatorFromClassloader
in class AbstractTestSuiteChunkerImpl<PowerMockJUnit3RunnerDelegate>
Exception
protected void chunkClass(Class<?> testClass) throws Exception
chunkClass
in class AbstractTestSuiteChunkerImpl<PowerMockJUnit3RunnerDelegate>
Exception
public int getTestCount()
getTestCount
in interface TestSuiteChunker
public boolean shouldExecuteTestForMethod(Class<?> testClass, Method potentialTestMethod)
shouldExecuteTestForMethod
in interface TestSuiteChunker
testClass
- The class that defines the method.potentialTestMethod
- The method to inspect whether it should be executed in the
test suite or not.true
if the method is a test method and should be
executed, false
otherwise.public void addTest(junit.framework.Test test) throws Exception
addTest
in interface JUnit3TestSuiteChunker
Exception
public void addTestSuite(Class<? extends junit.framework.TestCase> testClass) throws Exception
addTestSuite
in interface JUnit3TestSuiteChunker
Exception
public int countTestCases()
countTestCases
in interface JUnit3TestSuiteChunker
public void run(junit.framework.TestResult result)
run
in interface JUnit3TestSuiteChunker
public void runTest(junit.framework.Test test, junit.framework.TestResult result)
runTest
in interface JUnit3TestSuiteChunker
public junit.framework.Test testAt(int index)
testAt
in interface JUnit3TestSuiteChunker
public void addTestClassToSuite(Class<?> clazz) throws Exception
TestSuiteChunker.shouldExecuteTestForMethod(Class, Method)
to see if
it should be executed.addTestClassToSuite
in interface JUnit3TestSuiteChunker
clazz
- The class that should contain test cases.Exception
- If something unexpected goes wrong.public Enumeration<?> tests()
tests
in interface JUnit3TestSuiteChunker
Copyright © 2007-2012. All Rights Reserved.