junit.extensions.xml.elements
Class SuiteTagHandler

java.lang.Object
  extended byjunit.extensions.xml.elements.AbstractTagHandler
      extended byjunit.extensions.xml.elements.SuiteTagHandler
All Implemented Interfaces:
XMLConstants

public class SuiteTagHandler
extends AbstractTagHandler

This class will handle the processing of <suite> nodes. These nodes may contain taghandlers, procedures, property, test and file elements.

Procedures defined at the test suite level are visible to all children test cases. Children may define procedures of the same name. Access to the higher level procedure is then done via explicit reference to the parent with "../".

Required Attributes

name - The test suite name.

Children

 file - see FileTagHander
 taghandlers - see TagHandlersTagHander
 suite - recursive reference.
 test - see TestTagHandler
 procedure - see ProcedureTagHandler
 property - see PropertyTagHandler
 

Author:
Vijay Aravamudhan : ThoughtWorks Inc.

Field Summary
 
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
SuiteTagHandler(org.w3c.dom.Element element, IXMLTestSuite testSuite)
          Default constructor.
 
Method Summary
protected  void addTestSuite()
          Add the test suite to the parent XMLTestSuite.
protected  IXMLTestSuite createSuite(java.lang.String file, org.w3c.dom.Element element)
          Creates a XMLTestSuite implementation.
protected  java.lang.String getName()
          Get the value of the name attribute.
 void processElement()
          Process the children of the suite.
 void validateElement()
          Validate that the tag name is suite.
 
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
 

Constructor Detail

SuiteTagHandler

public SuiteTagHandler(org.w3c.dom.Element element,
                       IXMLTestSuite testSuite)
Default constructor.

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 suite.

Specified by:
processElement in class AbstractTagHandler
Throws:
XMLException - is thrown if the element cannot be understood.

validateElement

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

Overrides:
validateElement in class AbstractTagHandler
Throws:
XMLException - if this is used against a different tag.

getName

protected final java.lang.String getName()
Get the value of the name attribute.

Returns:
String value of the name attribute.

addTestSuite

protected void addTestSuite()
Add the test suite to the parent XMLTestSuite.


createSuite

protected IXMLTestSuite createSuite(java.lang.String file,
                                    org.w3c.dom.Element element)
Creates a XMLTestSuite implementation.

Parameters:
file - file to be processed.
element - element to be processed.
Returns:
IXMLTestSuite Impementation.


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