org.hsqldb.test
Class TestUtil
- java.lang.Object
-
- org.hsqldb.test.TestUtil
-
public class TestUtil extends java.lang.ObjectUtility 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. Script writers be aware that you can't use stderr to distinguish error messages. This class writes error messages to stdout.
-
-
Constructor Summary
Constructors Constructor and Description TestUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidcheckDatabaseFilesDeleted(java.lang.String path)static voiddeleteDatabase(java.lang.String path)static voidmain(java.lang.String[] argv)static voidsetAbortOnErr(boolean aoe)This method should certainly be an instance method.static voidtestScript(java.sql.Connection aConnection, java.lang.String sourceName, java.io.Reader inReader)Runs a preformatted script.
-
-
-
Method Detail
-
main
public static void main(java.lang.String[] argv)
-
deleteDatabase
public static void deleteDatabase(java.lang.String path)
-
checkDatabaseFilesDeleted
public static void checkDatabaseFilesDeleted(java.lang.String path)
-
testScript
public static void testScript(java.sql.Connection aConnection, java.lang.String sourceName, java.io.Reader inReader) throws java.sql.SQLException, java.io.IOExceptionRuns 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 databasesourceName- Identifies the script which failedinReader- Source of commands to be tested- Throws:
java.sql.SQLExceptionjava.io.IOException
-
setAbortOnErr
public static void setAbortOnErr(boolean aoe)
This method should certainly be an instance method. Can't do that until make this entire class OO.
-
-
DataMelt 3.0 © DataMelt by jWork.ORG