001: /*
002: * This software is released under a licence similar to the Apache Software Licence.
003: * See org.logicalcobwebs.proxool.package.html for details.
004: * The latest version is available at http://proxool.sourceforge.net
005: */
006: package org.logicalcobwebs.proxool;
007:
008: /**
009: * Some useful constants for testing.
010: *
011: * Note: these values will be overriden at startup by the GlobalTest init procedure.
012: *
013: * @version $Revision: 1.8 $, $Date: 2006/03/24 00:19:10 $
014: * @author Bill Horsman (bill@logicalcobwebs.co.uk)
015: * @author $Author: billhorsman $ (current maintainer)
016: * @since Proxool 0.5
017: */
018: public class TestConstants {
019:
020: /**
021: * Proxool Driver class
022: */
023: public static String PROXOOL_DRIVER = "org.logicalcobwebs.proxool.ProxoolDriver";
024:
025: /**
026: * JDBC driver class
027: */
028: public static String HYPERSONIC_DRIVER = "org.hsqldb.jdbcDriver";
029:
030: /**
031: * URL connection base (without database)
032: */
033: public static String HYPERSONIC_URL_PREFIX = "jdbc:hsqldb:db/";
034:
035: /**
036: * URL to a first test database. User should have rw access
037: */
038: public static String HYPERSONIC_TEST_URL = HYPERSONIC_URL_PREFIX
039: + "test";
040:
041: /**
042: * URL to a second test database
043: */
044: public static String HYPERSONIC_TEST_URL2 = HYPERSONIC_URL_PREFIX
045: + "2";
046:
047: /**
048: * Connection credentials
049: */
050: public static String HYPERSONIC_USER = "sa";
051:
052: /**
053: * Connection credentials
054: */
055: public static String HYPERSONIC_PASSWORD = "";
056:
057: /**
058: * SQL statement that should always succeed
059: */
060: public static String HYPERSONIC_TEST_SQL = "SELECT COUNT(1) FROM INFORMATION_SCHEMA.SYSTEM_TABLES";
061:
062: /**
063: * SQL statement that should always succeed
064: */
065: public static String HYPERSONIC_TEST_SQL_2 = "SELECT COUNT(2) FROM INFORMATION_SCHEMA.SYSTEM_TABLES";
066:
067: /**
068: * SQL statement that should always fail
069: */
070: public static String FATAL_SQL_STATEMENT = "drop table Z";
071:
072: /**
073: * SQLException message fragment used to detect fatal exceptions
074: */
075: public static String FATAL_SQL_EXCEPTION = "Table not found";
076: }
077:
078: /*
079: Revision history:
080: $Log: TestConstants.java,v $
081: Revision 1.8 2006/03/24 00:19:10 billhorsman
082: Changes for HSQL 1.8
083:
084: Revision 1.7 2005/10/07 08:10:33 billhorsman
085: Second test SQL
086:
087: Revision 1.6 2004/05/26 17:19:09 brenuart
088: Allow JUnit tests to be executed against another database.
089: By default the test configuration will be taken from the 'testconfig-hsqldb.properties' file located in the org.logicalcobwebs.proxool package.
090: This behavior can be overriden by setting the 'testConfig' environment property to another location.
091:
092: Revision 1.5 2003/09/30 18:39:39 billhorsman
093: New test sql syntax constant
094:
095: Revision 1.4 2003/03/03 11:12:05 billhorsman
096: fixed licence
097:
098: Revision 1.3 2003/02/27 18:01:48 billhorsman
099: completely rethought the test structure. it's now
100: more obvious. no new tests yet though.
101:
102: Revision 1.2 2003/02/19 15:14:26 billhorsman
103: fixed copyright (copy and paste error,
104: not copyright change)
105:
106: Revision 1.1 2002/11/13 20:23:58 billhorsman
107: improved tests
108:
109: */
|