|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.TestSuite junit.extensions.xml.XMLTestSuite
Test Case for running XML Script based testing.
Field Summary | |
private org.w3c.dom.Element |
m_element
Element for this test suite. |
private java.lang.String |
m_fileName
The name of the test xml script file - found from the classpath. |
private IXMLTest |
m_parent
Parent Test Suite. |
private XMLObjectCache |
m_procedures
Collection of valid procedures for the test case. |
private XMLPropertyCache |
m_propertyCache
Object cahce used to hold globals set by the test case. |
Fields inherited from class junit.framework.TestSuite |
|
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 | |
XMLTestSuite()
A no-argument constructor to support junit 3.8. |
|
XMLTestSuite(java.lang.String fileName)
A constructor accepting the name of the test script file. |
|
XMLTestSuite(java.lang.String fileName,
org.w3c.dom.Element element)
A constructor accepting the name of the test script file and the element to be processed. |
|
XMLTestSuite(java.lang.String name,
java.io.InputStream stream)
A constructor accepting the name of the test script file. |
Method Summary | |
void |
addFile(java.lang.String xmlFileName)
Add the given XML file to the TestSuite. |
void |
addProcedure(IXMLProcedure proc)
Add a procedure to the test suite. |
void |
addProperty(java.lang.String name,
java.lang.Object value)
Adds a found object to the cache. |
void |
addTest(junit.framework.Test test)
Add a test to the test suite. |
void |
clearProperties()
Clear the properties. |
boolean |
getDebug()
Get the debug state. |
java.lang.String |
getFileName()
Returns the filename. |
IXMLProcedure |
getProcedure(java.lang.String name)
Get the procedure by the given name. |
XMLObjectCache |
getProcedureCache()
Get the procedure cache. |
java.lang.Object |
getProperty(java.lang.String name)
Get the value of a property. |
XMLObjectCache |
getPropertyCache()
Get the found object cache. |
java.lang.String |
getPropertyName(java.lang.Object value)
Reverse lookup the property name from the value of the property. |
java.lang.String[] |
getPropertyNames()
Get the property names. |
private void |
processChildren(org.w3c.dom.Element e)
Process the children of the test suite. |
void |
removeProperty(java.lang.String name)
Remove a property. |
java.lang.String |
resolveProperties(java.lang.String s)
Resolve embeded property names withing a string. |
void |
setParent(IXMLTest parent)
Set the parent of this test case. |
Methods inherited from class junit.framework.TestSuite |
addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface junit.framework.Test |
countTestCases, run |
Field Detail |
private org.w3c.dom.Element m_element
private IXMLTest m_parent
private java.lang.String m_fileName
private final XMLObjectCache m_procedures
private XMLPropertyCache m_propertyCache
Constructor Detail |
public XMLTestSuite()
public XMLTestSuite(java.lang.String fileName)
fileName
- The name of the test script file (found from the classpath)public XMLTestSuite(java.lang.String name, java.io.InputStream stream)
name
- A dummy name for the filestream
- The contents of the test script filepublic XMLTestSuite(java.lang.String fileName, org.w3c.dom.Element element)
fileName
- The name of the test script file (found from the classpath)element
- The element to be processed.Method Detail |
public boolean getDebug()
getDebug
in interface IXMLTest
public final void setParent(IXMLTest parent)
setParent
in interface IXMLTest
parent
- Parent test.public java.lang.String getFileName()
getFileName
in interface IXMLTestSuite
public IXMLProcedure getProcedure(java.lang.String name)
getProcedure
in interface IXMLTest
name
- The name of the procedure to
be returned.
public XMLObjectCache getProcedureCache()
getProcedureCache
in interface IXMLTest
public java.lang.Object getProperty(java.lang.String name)
getProperty
in interface IXMLTest
name
- Name of the property to be returned.
public XMLObjectCache getPropertyCache()
getPropertyCache
in interface IXMLTest
public java.lang.String getPropertyName(java.lang.Object value)
getPropertyName
in interface IXMLTest
value
- Value to be looked up.
public java.lang.String[] getPropertyNames()
getPropertyNames
in interface IXMLTest
public void addFile(java.lang.String xmlFileName)
addFile
in interface IXMLTestSuite
xmlFileName
- The name of the test script file to be added.public void addProcedure(IXMLProcedure proc)
addProcedure
in interface IXMLTest
proc
- Procedure to be added.public void addProperty(java.lang.String name, java.lang.Object value)
addProperty
in interface IXMLTest
name
- Name of the object.value
- Value of the object.public void addTest(junit.framework.Test test)
addTest
in interface IXMLTestSuite
test
- Test to be added.public void clearProperties()
clearProperties
in interface IXMLTest
public void removeProperty(java.lang.String name)
removeProperty
in interface IXMLTest
name
- Name of the property to be removed.public java.lang.String resolveProperties(java.lang.String s)
resolveProperties
in interface IXMLTest
s
- String to be resolved.
private void processChildren(org.w3c.dom.Element e)
e
- Element which contains the children to be processed.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |