Documentation of 'org.hsqldb.test.TestUtil' Java class
TestUtil
org.hsqldb.test

Class TestUtil



  • public class TestUtil
    extends java.lang.Object
    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. 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 void checkDatabaseFilesDeleted(java.lang.String path) 
      static void deleteDatabase(java.lang.String path) 
      static void main(java.lang.String[] argv) 
      static void setAbortOnErr(boolean aoe)
      This method should certainly be an instance method.
      static void testScript(java.sql.Connection aConnection, java.lang.String sourceName, java.io.Reader inReader)
      Runs a preformatted script.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TestUtil

        public TestUtil()
    • 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.IOException
        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
        sourceName - Identifies the script which failed
        inReader - Source of commands to be tested
        Throws:
        java.sql.SQLException
        java.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

You see the box below because you did not login.