|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.extensions.xml.elements.AbstractTagHandler
junit.extensions.xml.elements.EchoTagHandler
Provide a mechanism for sending debug messages to the test case developer.
message - the message to output [required] mode - what is the output mechanism [optional] 'stdout' is default, sends output to stdout 'dialog' sends the output to a JOptionPane 'confirm' sends the output to a JOptionPane confirmation dialog. 'stderr' sends the output to stderr block - Block is a valid attribute when the mode is dialog or confirm. It controlls the modality of the dialog. Default value is true.
<echo message="hello world"/> <echo mode='dialog' message="hello world"/> <echo mode='dialog' block="false" message="hello world"/> <echo mode='stderr' message="hello world"/>
Nested Class Summary | |
private class |
EchoTagHandler.EchoDialog
Title: EchoDialog non-modal dialog for echos |
Field Summary | |
private boolean |
m_result
Window close result. |
private static int |
NO_OPTION
Result of confirm dialog when NO or CANCEL button is pressed. |
private static int |
YES_OPTION
Result of confirm dialog when YES button is pressed. |
Fields inherited from class junit.extensions.xml.elements.AbstractTagHandler |
|
Fields inherited from interface junit.extensions.xml.XMLConstants |
ACTION, ACTUALOBJ, ACTUALREFID, ADD, ASSERTENABLED, ASSERTEQUALS, ASSERTNOTEQUALS, ASSERTNOTNULL, ASSERTNOTSAME, ASSERTNULL, ASSERTSAME, CALL, CASE, CHOOSE, CLASSNAME, COLUMN, CONFIRM, DEBUG, DEFAULT, DELIMITER, DIALOG, DUMP, ECHO, ENABLED, ENCODING, EVALUATE, EXPECTEDOBJ, EXPECTEDREFID, FAIL, FILE, FOCUS, FOREACH, ID, INDEX, JFCFILELOC, LESSTHAN, LISTITEM, LOG, MARK, MESSAGE, METHOD, MODE, NAME, OTHERWISE, PATHREFID, PROCEDURE, PROPERTY, RECURSIVE, REFID, RELATIVE, REMOVE, ROW, SAVE, STDERR, STDOUT, STOPWATCH, SUITE, SWITCH, TABLECELL, TAGHANDLERS, TAGNAME, TEST, TYPE, USERE, VALUE, WHEN, WHILE |
Constructor Summary | |
EchoTagHandler(org.w3c.dom.Element element,
IXMLTestCase testcase)
Constructor. |
Method Summary | |
void |
processElement()
Handle the XML processing of the tag 'echo'. |
(package private) int |
showConfirm(java.lang.String msg)
Show a confirm dialog. |
(package private) void |
showDialog(java.lang.String msg)
Show a Dialog. |
(package private) int |
showDialog(java.lang.String msg,
boolean confirm)
Show the dialog with the message given. |
void |
validateElement()
Make sure the appropriate tag and attributes are used. |
Methods inherited from class junit.extensions.xml.elements.AbstractTagHandler |
checkAtLeastOneRequiredAttribute, checkAtLeastOneRequiredAttribute, checkElementTagName, checkOneRequiredAttribute, checkOneRequiredAttribute, checkRequiredAttribute, checkRequiredAttribute, getBoolean, getBoolean, getBoolean, getBoolean, getElement, getInt, getInt, getLong, getLong, getPoint, getPoint, getString, getString, getString, getString, getTagName, getTest, getTestCase, getXMLTestCase, getXMLTestSuite, resolveVariables |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int YES_OPTION
private static final int NO_OPTION
private boolean m_result
Constructor Detail |
public EchoTagHandler(org.w3c.dom.Element element, IXMLTestCase testcase)
element
- Element to be processed by the tag handler.testcase
- parent test case.Method Detail |
public void processElement() throws XMLException
processElement
in class AbstractTagHandler
XMLException
- upon failure of processing.public void validateElement() throws XMLException
validateElement
in class AbstractTagHandler
XMLException
- when validation fails.int showConfirm(java.lang.String msg)
msg
- Message to be displayed.
void showDialog(java.lang.String msg)
msg
- Message to be displayed.int showDialog(java.lang.String msg, boolean confirm)
msg
- message to be displayed.confirm
- if true then use YES/NO buttons.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |