junit.extensions.xml.elements
Class TestTagHandler

java.lang.Object
  extended byjunit.extensions.xml.elements.AbstractTagHandler
      extended byjunit.extensions.xml.elements.TestTagHandler
All Implemented Interfaces:
XMLConstants
Direct Known Subclasses:
TestTagHandler

public class TestTagHandler
extends AbstractTagHandler

This class will handle the processing of <test> nodes.

Tag Name

test

Required Attributes

name - Name of the test case.

Optional Attributes

Other attributes may be processed by the IXMLTestCase implementation.

Children

Each of the children elements are processed by the corresponding tag handler.

Author:
Vijay Aravamudhan : ThoughtWorks Inc.

Field Summary
protected  junit.framework.Test m_testCase
          Test Case.
 
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
TestTagHandler(org.w3c.dom.Element element, IXMLTestSuite testSuite)
          Constructor for TestTagHandler.
 
Method Summary
private  void addTest()
          Add a test to the parent test suite.
protected  junit.framework.Test createTest()
          This method is intended to be overridden when extending the class for other test types.
protected  java.lang.String getName()
          Returns the value of the NAME attribute for this element.
 void processElement()
          Process the children of the test case.
 void validateElement()
          Validate that the tag name is test.
 
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

m_testCase

protected junit.framework.Test m_testCase
Test Case.

Constructor Detail

TestTagHandler

public TestTagHandler(org.w3c.dom.Element element,
                      IXMLTestSuite testSuite)
Constructor for TestTagHandler.

Parameters:
element - The element to be processed
testSuite - The XMLTestSuite that uses this element
Method Detail

processElement

public void processElement()
                    throws XMLException
Process the children of the test case.

Specified by:
processElement in class AbstractTagHandler
Throws:
XMLException - may be thrown.

validateElement

public void validateElement()
                     throws XMLException
Validate that the tag name is test.

Overrides:
validateElement in class AbstractTagHandler
Throws:
XMLException - if the tag name is not test.

getName

protected java.lang.String getName()
Returns the value of the NAME attribute for this element.

Returns:
String The value of the NAME attribute.

createTest

protected junit.framework.Test createTest()
This method is intended to be overridden when extending the class for other test types.

Returns:
Test New test instance.

addTest

private void addTest()
Add a test to the parent test suite.



Licensed under: GNU Lesser General Public License, Ver 2.1, February 1999