public abstract class TestCase
extends java.lang.Object
Constructor and Description |
---|
TestCase(java.lang.String name)
Construct a test case with the given name
|
Modifier and Type | Method and Description |
---|---|
void |
assertEquals(java.lang.Object first,
java.lang.Object second,
java.lang.String msg)
Assert the equality of two objects.
|
void |
assertExpr(boolean passed,
java.lang.String msg)
Make an assertion, and fail the test if it isn't satisfied.
|
abstract void |
check()
Report on the results of running the test.
|
void |
fail(java.lang.String msg)
Fail a test.
|
int |
getExecutionTime()
Get the execution time of this test case.
|
java.lang.String |
getName()
Get the name of this test case
|
void |
init()
Initialize the test case.
|
abstract void |
run()
Run the test case.
|
void |
startTimer()
Start the execution timer.
|
void |
stopTimer()
Stop the execution timer.
|
public TestCase(java.lang.String name)
public abstract void check() throws TestFailedException
TestFailedException
public void assertExpr(boolean passed, java.lang.String msg) throws TestFailedException
TestFailedException
public void assertEquals(java.lang.Object first, java.lang.Object second, java.lang.String msg) throws TestFailedException
TestFailedException
public void fail(java.lang.String msg) throws TestFailedException
TestFailedException
public int getExecutionTime()
public java.lang.String getName()
public void init() throws java.lang.Exception
java.lang.Exception
public abstract void run() throws java.lang.Exception
java.lang.Exception
public void startTimer()
public void stopTimer()