junit.extensions.xml.elements
Class FileTagHandler

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

public class FileTagHandler
extends AbstractTagHandler

This class includes the given file into a test suite.

Tag Name

file

Required Attributes

name - file name of the given file. relative - value true if the file should be located relative to the current file. Default value is false for backward compatibility.

Example

 <suite name="MyTest">
     <file name="moresuites.xml"/>
     <file name="extras/moresuites.xml" relative="true"/>
 </suite>
 

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
FileTagHandler(org.w3c.dom.Element element, IXMLTestSuite testSuite)
          Default constructor.
 
Method Summary
 void processElement()
          Process the file element.
 void validateElement()
          Validate that the name element has been added.
 
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

FileTagHandler

public FileTagHandler(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 file element.

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 name element has been added.

Overrides:
validateElement in class AbstractTagHandler
Throws:
XMLException - if the name attribute is not specified.


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