|
Jetif v1.8.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjetif.TestCase
A TestCase class is a collection of test methods. All test logic
are implemented in a TestCase class. This base class provides the
way to access the test comments, define common procedure of each test case.
| Constructor Summary | |
TestCase()
|
|
| Method Summary | |
protected static void |
abort(String msg)
Abort current test case with given message. |
void |
addComment(String comment)
Add comment for this case result. |
protected static void |
assertTrue(boolean condition)
Assert the condition should be a true value. |
protected static void |
assertTrue(String msg,
boolean condition)
Assert the condition should be a true value. |
protected void |
cleanup(boolean flag)
Perform cleanup for each test case. |
void |
clearComments()
Clear all comments of this case result. |
protected static void |
fail(String msg)
Fails a test with the given message. |
protected Class |
getTestClass()
Returns the target test class for testing. |
protected Object |
getTestObject()
Returns the target test object for testing. |
void |
removeComment(String comment)
Remove a comment from this case result. |
protected boolean |
setup()
Perform setup for each test case. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public TestCase()
| Method Detail |
protected Class getTestClass()
throws FrameworkException
FrameworkException - if error occurs.
protected Object getTestObject()
throws FrameworkException
FrameworkException - if error occurs.protected boolean setup()
protected void cleanup(boolean flag)
flag - the value returned by setup() method.protected static void assertTrue(boolean condition)
condition - the condition to be tested.
protected static void assertTrue(String msg,
boolean condition)
msg - message about this assertion.condition - the condition to be tested.protected static void abort(String msg)
msg - the message to explain the reason to abort the test case.protected static void fail(String msg)
public void addComment(String comment)
comment - the comment messagepublic void removeComment(String comment)
comment - the comment message.public void clearComments()
|
Jetif v1.8.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||