| java.lang.Object org.hsqldb.test.TestUtil
All known Subclasses: org.hsqldb.test.TestSelf,
TestUtil | public class TestUtil (Code) | | Utility class providing methodes for submitting test statements or
scripts to the database, comparing the results returned with
the expected results. The test script format is compatible with existing
scripts.
author: ewanslater@users author: fredt@users |
Method Summary | |
static void | print(String s) | static void | test(Statement stat, String s, int line) Performs a preformatted statement or group of statements and throws
if the result does not match the expected one. | static void | testScript(Connection aConnection, String aPath) Runs a preformatted script.
Where a result set is required, each line in the script will
be interpreted as a seperate expected row in the ResultSet
returned by the query. |
print | static void print(String s)(Code) | | Method to save typing ;-)
Parameters: s - String to be printed |
test | static void test(Statement stat, String s, int line)(Code) | | Performs a preformatted statement or group of statements and throws
if the result does not match the expected one.
Parameters: line - start line in the script file for this test Parameters: stat - Statement object used to access the database Parameters: s - Contains the type, expected result and SQL for the test |
testScript | static void testScript(Connection aConnection, String aPath)(Code) | | Runs a preformatted script.
Where a result set is required, each line in the script will
be interpreted as a seperate expected row in the ResultSet
returned by the query. Within each row, fields should be delimited
using either comma (the default), or a user defined delimiter
which should be specified in the System property TestUtilFieldDelimiter
Parameters: aConnection - Connection object for the database Parameters: aPath - Path of the script file to be tested |
|
|