|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.sqlunit.tools.ToolUtils
public final class ToolUtils
Provides methods for common functionality used by the tools.
Method Summary | |
---|---|
static java.util.Properties |
getConfiguration(java.lang.String resource)
Parses the configuration property map to get configuration name value pairs and returns it as a Properties object. |
static java.sql.Connection |
getConnection(java.util.Properties props)
Returns a reference to a database Connection using values in the properties object. |
static void |
makeTest(java.lang.String sql,
Param[] params,
java.lang.String testName,
java.util.Properties config)
Runs a database query with the specified Connection object and the Properties file passed in. |
static void |
releaseConnection()
Releases the connection object after the test is complete. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.util.Properties getConfiguration(java.lang.String resource) throws java.lang.Exception
resource
- the name of the resource file to use.
java.lang.Exception
- if there was a problem.public static java.sql.Connection getConnection(java.util.Properties props) throws java.lang.Exception
props
- a Properties object.
java.lang.Exception
- if there was a problem.public static void releaseConnection()
public static void makeTest(java.lang.String sql, Param[] params, java.lang.String testName, java.util.Properties config) throws java.lang.Exception
sql
- the JDOM Element representing the SQL to execute.params
- an array of Param objects.testName
- the name of the test to use.config
- the Properties object.
java.lang.Exception
- if there was a problem.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |