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
TestFailedException
public void assertExpr(boolean passed, String msg) throws TestFailedException
TestFailedException
public void assertEquals(Object first, Object second, String msg) throws TestFailedException
TestFailedException
public void fail(String msg) throws TestFailedException
TestFailedException
public int getExecutionTime()
public String getName()
public void init() throws Exception
Exception
public abstract void run() throws Exception
Exception
public void startTimer()
public void stopTimer()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.