|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.baselinetest.Assert org.baselinetest.TestCase
public abstract class TestCase
A TestCase represents one of the TestCase classes that is used to comprise a TestSuite. It is made of one to many TestCaseSteps which each represent a single invocation of this TestCase.
Constructor Summary | |
---|---|
TestCase(TestSuite testSuite)
|
Method Summary | |
---|---|
abstract void |
cleanup()
Cleanup the test case. |
void |
doAllWork()
|
abstract void |
doWork()
Run the test case. |
ArgumentCollection |
getArgumentCollection()
Gets the ArgumentCollection of the current TestCaseStep during doWork(), otherwise the ArgumentCollection of the TestCase. |
ArgumentCollection |
getCaseArguments()
Gets the ArgumentCollection for this TestCase. |
java.io.File |
getContextDir()
Gets the directory for the context used to invoke this TestCase. |
TestCaseStep |
getCurrentTestCaseStep()
Gets the currently running TestCaseStep during doWork(). |
java.io.File |
getInheritedFile(java.lang.String fileName)
Obtain a file with the given name. |
java.io.File |
getResultsDir()
Gets the directory for the test results for the test suite. |
java.io.File |
getSuiteDir()
Gets the directory for the TestSuite. |
int |
getTestCaseNumber()
|
TestState |
getTestState()
Gets the TestState for the current TestSuite. |
TestSuite |
getTestSuite()
Gets the current TestSuite. |
abstract void |
init()
Initialize the test case. |
void |
log(java.lang.String logText)
Output a message to the execution logs. |
void |
log(java.lang.Throwable t)
Output a throwable to the execution logs. |
void |
print(boolean b)
Add to the baseline output. |
void |
print(int i)
Add to the baseline output. |
void |
print(long l)
Add to the baseline output. |
void |
print(java.lang.Object o)
Add to the baseline output. |
void |
print(short s)
Add to the baseline output. |
void |
println()
Add a CR to the baseline output. |
void |
println(boolean b)
Add to the baseline output. |
void |
println(int i)
Add to the baseline output. |
void |
println(long l)
Add to the baseline output. |
void |
println(java.lang.Object o)
Add to the baseline output. |
void |
println(short s)
Add to the baseline output. |
void |
printlnSubstitution(java.lang.String category,
java.lang.Object o)
|
void |
printSubstitution(java.lang.String category,
java.lang.Object o)
Print the substituted version of this object |
void |
run(TestResult testResult)
|
void |
setTestCaseNumber(int testCaseNumber)
|
Methods inherited from class org.baselinetest.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, toString, wait, wait, wait |
Constructor Detail |
---|
public TestCase(TestSuite testSuite)
Method Detail |
---|
public ArgumentCollection getCaseArguments()
getArgumentCollection()
public ArgumentCollection getArgumentCollection()
public java.io.File getContextDir()
public java.io.File getResultsDir()
public java.io.File getSuiteDir()
public TestCaseStep getCurrentTestCaseStep()
public TestState getTestState()
public TestSuite getTestSuite()
public java.io.File getInheritedFile(java.lang.String fileName)
fileName
- the name of the file to return.
public abstract void doWork()
public abstract void init() throws java.lang.Exception
java.lang.Exception
public abstract void cleanup() throws java.lang.Exception
java.lang.Exception
public final void doAllWork()
public void run(TestResult testResult)
public void println()
public void print(boolean b)
b
- value to be printed to the baseline.public void println(boolean b)
b
- value to be printed to the baseline.public void print(int i)
i
- value to be printed to the baseline.public void println(int i)
i
- value to be printed to the baseline.public void print(long l)
l
- value to be printed to the baseline.public void println(long l)
l
- value to be printed to the baseline.public void print(short s)
s
- value to be printed to the baseline.public void println(short s)
s
- value to be printed to the baseline.public void print(java.lang.Object o)
o
- Object to be printed to the baseline.public void printSubstitution(java.lang.String category, java.lang.Object o)
category
- substitution category to use for printingo
- object to lookup the substitution forpublic void printlnSubstitution(java.lang.String category, java.lang.Object o)
category
- substitution category to use for printingo
- object to lookup the substitution forpublic void println(java.lang.Object o)
o
- Object to be printed to the baseline.public void log(java.lang.String logText)
logText
- the text to be logged.public void log(java.lang.Throwable t)
t
- the throwable to be logged.public int getTestCaseNumber()
public void setTestCaseNumber(int testCaseNumber)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |