KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > logicalcobwebs > proxool > TestConstants


1 /*
2  * This software is released under a licence similar to the Apache Software Licence.
3  * See org.logicalcobwebs.proxool.package.html for details.
4  * The latest version is available at http://proxool.sourceforge.net
5  */

6 package org.logicalcobwebs.proxool;
7
8 /**
9  * Some useful constants for testing.
10  *
11  * Note: these values will be overriden at startup by the GlobalTest init procedure.
12  *
13  * @version $Revision: 1.8 $, $Date: 2006/03/24 00:19:10 $
14  * @author Bill Horsman (bill@logicalcobwebs.co.uk)
15  * @author $Author: billhorsman $ (current maintainer)
16  * @since Proxool 0.5
17  */

18 public class TestConstants {
19
20     /**
21      * Proxool Driver class
22      */

23     public static String JavaDoc PROXOOL_DRIVER = "org.logicalcobwebs.proxool.ProxoolDriver";
24
25     /**
26      * JDBC driver class
27      */

28     public static String JavaDoc HYPERSONIC_DRIVER = "org.hsqldb.jdbcDriver";
29
30     /**
31      * URL connection base (without database)
32      */

33     public static String JavaDoc HYPERSONIC_URL_PREFIX = "jdbc:hsqldb:db/";
34
35     /**
36      * URL to a first test database. User should have rw access
37      */

38     public static String JavaDoc HYPERSONIC_TEST_URL = HYPERSONIC_URL_PREFIX + "test";
39     
40     /**
41      * URL to a second test database
42      */

43     public static String JavaDoc HYPERSONIC_TEST_URL2 = HYPERSONIC_URL_PREFIX + "2";
44     
45     /**
46      * Connection credentials
47      */

48     public static String JavaDoc HYPERSONIC_USER = "sa";
49
50     /**
51      * Connection credentials
52      */

53     public static String JavaDoc HYPERSONIC_PASSWORD = "";
54
55     /**
56      * SQL statement that should always succeed
57      */

58     public static String JavaDoc HYPERSONIC_TEST_SQL = "SELECT COUNT(1) FROM INFORMATION_SCHEMA.SYSTEM_TABLES";
59
60     /**
61      * SQL statement that should always succeed
62      */

63     public static String JavaDoc HYPERSONIC_TEST_SQL_2 = "SELECT COUNT(2) FROM INFORMATION_SCHEMA.SYSTEM_TABLES";
64
65     /**
66      * SQL statement that should always fail
67      */

68     public static String JavaDoc FATAL_SQL_STATEMENT = "drop table Z";
69     
70     /**
71      * SQLException message fragment used to detect fatal exceptions
72      */

73     public static String JavaDoc FATAL_SQL_EXCEPTION = "Table not found";
74 }
75
76 /*
77  Revision history:
78  $Log: TestConstants.java,v $
79  Revision 1.8 2006/03/24 00:19:10 billhorsman
80  Changes for HSQL 1.8
81
82  Revision 1.7 2005/10/07 08:10:33 billhorsman
83  Second test SQL
84
85  Revision 1.6 2004/05/26 17:19:09 brenuart
86  Allow JUnit tests to be executed against another database.
87  By default the test configuration will be taken from the 'testconfig-hsqldb.properties' file located in the org.logicalcobwebs.proxool package.
88  This behavior can be overriden by setting the 'testConfig' environment property to another location.
89
90  Revision 1.5 2003/09/30 18:39:39 billhorsman
91  New test sql syntax constant
92
93  Revision 1.4 2003/03/03 11:12:05 billhorsman
94  fixed licence
95
96  Revision 1.3 2003/02/27 18:01:48 billhorsman
97  completely rethought the test structure. it's now
98  more obvious. no new tests yet though.
99
100  Revision 1.2 2003/02/19 15:14:26 billhorsman
101  fixed copyright (copy and paste error,
102  not copyright change)
103
104  Revision 1.1 2002/11/13 20:23:58 billhorsman
105  improved tests
106
107 */

108
Popular Tags