|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjmunit.framework.cldc11.GuiListener
public class GuiListener
The GuiListener class displays the results of running a test as a green/red bar together with the number of tests, failures and errors and the running time.
Constructor Summary | |
---|---|
GuiListener(Test testMidlet)
|
Method Summary | |
---|---|
void |
addError(java.lang.Class testClass,
java.lang.String test,
java.lang.Throwable t)
Appends the error to the list of failed test cases. |
void |
addFailure(java.lang.Class testClass,
java.lang.String test,
AssertionFailedException t)
Appends the failure to the list of failed test cases. |
void |
clear()
Clears the status of any previous test runs. |
void |
commandAction(javax.microedition.lcdui.Command cmd,
javax.microedition.lcdui.Displayable disp)
Responds to a user command. |
void |
endTest(java.lang.Class testClass,
java.lang.String test)
Refreshes the display to indicate that a test has finished running. |
int |
getNumberCompletedTests()
Returns the number of tests that have been run. |
int |
getNumberErrors()
Returns the number of errors reported. |
int |
getNumberFailures()
Returns the number of failures reported. |
int |
getNumberSuccessful()
Returns the number successful tests run. |
int |
getNumberTests()
Returns the total number of tests in the test suite. |
long |
getRunningTime()
Returns how long the tests have taken to run. |
void |
startTest(java.lang.Class testClass,
java.lang.String test)
The GuiListener ignores the fact that a test has started running. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GuiListener(Test testMidlet)
testMidlet
- Method Detail |
---|
public void addError(java.lang.Class testClass, java.lang.String test, java.lang.Throwable t)
addError
in interface TestListener
testClass
- The Class associated with the test.test
- The test.t
- The error.public void addFailure(java.lang.Class testClass, java.lang.String test, AssertionFailedException t)
addFailure
in interface TestListener
testClass
- The Class associated with the test.test
- The test.t
- The failure.public void endTest(java.lang.Class testClass, java.lang.String test)
endTest
in interface TestListener
testClass
- The Class associated with the test.test
- The test case that finished running.public void startTest(java.lang.Class testClass, java.lang.String test)
startTest
in interface TestListener
testClass
- The Class associated with the test.test
- The test that started.public int getNumberTests()
public int getNumberErrors()
public int getNumberCompletedTests()
public int getNumberFailures()
public int getNumberSuccessful()
public long getRunningTime()
public void commandAction(javax.microedition.lcdui.Command cmd, javax.microedition.lcdui.Displayable disp)
commandAction
in interface javax.microedition.lcdui.CommandListener
cmd
- The command.disp
- The display.public void clear()
clear
in interface TestListener
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |