|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.extensions.TestDecorator | +--junit.extensions.TestSetup | +--org.exolab.jmscts.core.TestRunner
This is the base class for test case runners.
Fields inherited from class junit.extensions.TestDecorator |
fTest |
Constructor Summary | |
TestRunner(junit.framework.Test test)
Construct an instance with the test case to run. |
Method Summary | |
void |
basicRun(junit.framework.TestResult result)
Runs the test case, by invoking runTest(junit.framework.Test, junit.framework.TestResult) . |
protected void |
checkImplements(java.lang.Class type)
Helper method to check that a test case or suite implements the appropriate interface. |
protected TestContext |
getChildContext()
Returns the test context of child test cases |
TestContext |
getContext()
Return the context to test against |
TestFilter |
getFilter()
Return the test case filter |
protected junit.framework.Test[] |
getTests()
Returns the test(s) as an array. |
protected abstract void |
runTest(junit.framework.Test test,
junit.framework.TestResult result)
Run a test case |
protected void |
setChildContext(TestContext context)
Sets the test context of child test cases |
void |
setContext(TestContext context)
Set the context to test against |
void |
setFilter(TestFilter filter)
Set the test case filter |
boolean |
share()
Returns if this test can share resources with other test cases. |
protected void |
tearDown()
Cleans up after the test case has been run |
Methods inherited from class junit.extensions.TestSetup |
run, setUp |
Methods inherited from class junit.extensions.TestDecorator |
countTestCases, getTest, toString |
Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
countTestCases, run |
Constructor Detail |
public TestRunner(junit.framework.Test test)
test
- the test case to run.Method Detail |
public void setContext(TestContext context)
setContext
in interface JMSTest
context
- the test contextpublic TestContext getContext()
getContext
in interface JMSTest
public void setFilter(TestFilter filter)
filter
- the test case filterpublic TestFilter getFilter()
public boolean share()
true
share
in interface JMSTest
true
public void basicRun(junit.framework.TestResult result)
runTest(junit.framework.Test, junit.framework.TestResult)
. If TestDecorator.getTest()
returns a TestSuite, then runTest(junit.framework.Test, junit.framework.TestResult)
will be invoked for each
contained test.basicRun
in class junit.extensions.TestDecorator
result
- the instance to collect results inprotected abstract void runTest(junit.framework.Test test, junit.framework.TestResult result)
test
- the test case to runresult
- the instance to collect results inprotected void setChildContext(TestContext context)
context
- the child test case contextprotected TestContext getChildContext()
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.extensions.TestSetup
java.lang.Exception
- for any errorprotected void checkImplements(java.lang.Class type) throws java.lang.Exception
type
- the interface that the test must implementjava.lang.Exception
- if the test doesn't implement the required interfaceprotected junit.framework.Test[] getTests()
TestSuite
,
the contained tests will be extracted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |