public abstract class TestCase extends Object
| Constructor and Description |
|---|
TestCase(String name)
Construct a test case with the given name
|
| Modifier and Type | Method and Description |
|---|---|
void |
assertEquals(Object first,
Object second,
String msg)
Assert the equality of two objects.
|
void |
assertExpr(boolean passed,
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(String msg)
Fail a test.
|
int |
getExecutionTime()
Get the execution time of this test case.
|
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(String name)
public abstract void check()
throws TestFailedException
TestFailedExceptionpublic void assertExpr(boolean passed,
String msg)
throws TestFailedException
TestFailedExceptionpublic void assertEquals(Object first, Object second, String msg) throws TestFailedException
TestFailedExceptionpublic void fail(String msg) throws TestFailedException
TestFailedExceptionpublic int getExecutionTime()
public String getName()
public void init()
throws Exception
Exceptionpublic abstract void run()
throws Exception
Exceptionpublic void startTimer()
public void stopTimer()
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.