|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jtestcase.JTestCase
public class JTestCase
This utility class is used for unit test to help reading data (test cases) from xml file.
Constructor Summary | |
---|---|
JTestCase(java.lang.String fileName,
java.lang.String className)
Constructed from full file name and class name. |
Method Summary | |
---|---|
Asserter |
getAsserter()
|
java.lang.String |
getClassUnderTest()
Returns the class name used to find the class tags in XML |
java.util.Hashtable |
getControlParams()
Retrieves all control parameters. |
int |
getCountOfTestCasesInMethod(java.lang.String methodName)
Get number of test cases for a given method. |
JTestCaseDigester |
getDigester()
|
java.util.Locale |
getGlobalParamLocale()
Helps setting the Locale for DateFormats |
java.util.Hashtable |
getGlobalParams()
Retrieves all global (class-wide) params into Hashtable. |
HashMapper |
getMapper()
|
java.lang.String |
getMClassName()
|
java.util.Vector |
getTestCasesInstancesInMethod(java.lang.String methodName)
Get all test cases' name for a given method into Vector. |
ComplexTypeConverter |
getTypeConverter()
|
void |
setAsserter(Asserter asserter)
|
void |
setMapper(HashMapper mapper)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JTestCase(java.lang.String fileName, java.lang.String className) throws JTestCaseException, java.io.FileNotFoundException
fileName
- -
name of data file. Will be searched by absolute path first. If
not found, then will be searched based on classpath.className
- -
name of test program. Is defined in data file in
/tests/class@name
JTestCaseException
- Problem with reading the file, validating the XML or with the
XML structure
java.io.FileNotFoundException
- Thrown if the fileName (xml data file) in not foundMethod Detail |
---|
public Asserter getAsserter()
public void setAsserter(Asserter asserter)
public HashMapper getMapper()
public void setMapper(HashMapper mapper)
public JTestCaseDigester getDigester()
public ComplexTypeConverter getTypeConverter()
public java.lang.String getMClassName()
public java.util.Hashtable getControlParams() throws JTestCaseException, java.io.FileNotFoundException
java.io.FileNotFoundException
- in case the file in not found
JTestCaseException
- in case of any other errorpublic java.util.Hashtable getGlobalParams() throws JTestCaseException, java.io.FileNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException
JTestCaseException
- if an internal error occurs
java.io.FileNotFoundException
java.lang.IllegalAccessException
java.lang.InstantiationException
public java.util.Locale getGlobalParamLocale() throws JTestCaseException, java.io.FileNotFoundException
JTestCaseException
java.io.FileNotFoundException
public int getCountOfTestCasesInMethod(java.lang.String methodName) throws JTestCaseException
methodName
- -
name of tested method. Defined in data file in
/tests/class/method@name.
JTestCaseException
- if an internal error occurspublic java.util.Vector getTestCasesInstancesInMethod(java.lang.String methodName) throws JTestCaseException
methodName
- -
name of tested method. Defined in data file in
/tests/class/method@test-case.
JTestCaseException
- if an internal error occurspublic java.lang.String getClassUnderTest()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |