|
|||||||||||
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 junit.extensions.jfcunit.tools.XMLRoot
Title: JFCUnit
Description: This class is a tool class which interfaces a JUnit test environment to the JFCUnits XML test environment. The application can be passed through system properties, the constructor, the static call to get the test suite, or through the main methods arguments. When XMLRoot is instanciated with no arguments then the following system properties are queried. jfcunit.xmlroot.classname required main classname. jfcunit.xmlroot.args optional parameters to the main method. jfcunit.xmlroot.testsuite XML test suite to be run. jfcunit.xmlroot.record If not specified the record tags will be ignored. jfcunit.xmlroot.create Create a new xml file if it does not exist.
Field Summary | |
static java.lang.String |
DOCUMENT_FACTORY
Document factory to be used as default. |
static java.lang.String |
XMLROOT_ARGS
System property for args. |
static java.lang.String |
XMLROOT_CLASSNAME
System property for classname. |
static java.lang.String |
XMLROOT_CREATE
System property for create the xml root. |
static java.lang.String |
XMLROOT_RECORD
System property for recording. |
static java.lang.String |
XMLROOT_TESTSUITE
System property for XML file. |
Fields inherited from class junit.extensions.xml.XMLTestSuite |
|
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 | |
XMLRoot()
Default constructor. |
|
XMLRoot(java.lang.String classname,
java.lang.String[] args,
java.lang.String filename)
Default constructor. |
Method Summary | |
protected static java.lang.String[] |
getArgs()
Get the jfcunit.xmlroot.args system property. |
protected static java.lang.String |
getClassName()
Get the jfcunit.xmlroot.classname system property. |
protected static java.lang.String |
getCommand(java.lang.String classname,
java.lang.String[] args)
Assembles the classname and args into one string. |
protected static boolean |
getCreate()
Get the XML file name from the jfcunit.xmlroot.create system property. |
protected static java.io.InputStream |
getInputStream(java.lang.String classname,
java.lang.String[] args,
java.lang.String fileName)
Get the input stream for the XML file. |
protected static boolean |
getRecord()
Get the state of the jfcunit.xmlroot.record system property. |
protected static java.lang.String |
getTestSuite()
Get the XML file name from the jfcunit.xmlroot.testsuite system property. |
static void |
main(java.lang.String[] args)
Application start method. |
static junit.framework.Test |
suite()
Creates a new test suite based on the system properties. |
static junit.framework.Test |
suite(java.lang.String classname,
java.lang.String[] args,
java.lang.String filename)
Creates a new test suite based on the main class and filename provided. |
private static void |
updateDocFactory()
Set the document factory if it is not set for java versions less than 1.4. |
Methods inherited from class junit.extensions.xml.XMLTestSuite |
addFile, addProcedure, addProperty, addTest, clearProperties, getDebug, getFileName, getProcedure, getProcedureCache, getProperty, getPropertyCache, getPropertyName, getPropertyNames, removeProperty, resolveProperties, setParent |
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 |
public static final java.lang.String DOCUMENT_FACTORY
public static final java.lang.String XMLROOT_CLASSNAME
public static final java.lang.String XMLROOT_ARGS
public static final java.lang.String XMLROOT_RECORD
public static final java.lang.String XMLROOT_TESTSUITE
public static final java.lang.String XMLROOT_CREATE
Constructor Detail |
public XMLRoot() throws java.lang.Exception
java.lang.Exception
- may be thrown.public XMLRoot(java.lang.String classname, java.lang.String[] args, java.lang.String filename) throws java.lang.Exception
classname
- Class name of the main application classargs
- Arguments to be passed to the main method.filename
- The filename of the XML test suite specification
java.lang.Exception
- may be thrown.Method Detail |
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- classname [args...] xmlfile
java.lang.Exception
- may be thrown.public static junit.framework.Test suite() throws java.lang.Exception
java.lang.Exception
- may be thrown.public static junit.framework.Test suite(java.lang.String classname, java.lang.String[] args, java.lang.String filename) throws java.lang.Exception
classname
- Class name of the main application classargs
- Arguments to be passed to the application.filename
- Name of XML file containing test suite
java.lang.Exception
- may be thrown.protected static final java.lang.String[] getArgs()
protected static final java.lang.String getClassName()
protected static final java.lang.String getCommand(java.lang.String classname, java.lang.String[] args)
classname
- program name.args
- Arguments used.
protected static final boolean getCreate()
protected static java.io.InputStream getInputStream(java.lang.String classname, java.lang.String[] args, java.lang.String fileName)
classname
- Classname added to template.args
- Arguments to be added to the template.fileName
- XML file name to be opened or created.
protected static final boolean getRecord()
protected static final java.lang.String getTestSuite()
private static void updateDocFactory()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |