01: /*
02: * This software is released under a licence similar to the Apache Software Licence.
03: * See org.logicalcobwebs.proxool.package.html for details.
04: * The latest version is available at http://proxool.sourceforge.net
05: */
06: package org.logicalcobwebs.proxool;
07:
08: import java.util.Properties;
09: import java.sql.Connection;
10: import java.sql.DriverManager;
11:
12: /**
13: * Tests whether we have access to the delegate connection
14: * @version $Revision: 1.1 $, $Date: 2004/03/23 21:14:24 $
15: * @author <a href="mailto:bill@logicalcobwebs.co.uk">Bill Horsman</a>
16: * @author $Author: billhorsman $ (current maintainer)
17: * @since Proxool 0.9
18: */
19: public class DelegateConnectionTest extends AbstractProxoolTest {
20:
21: /**
22: * @see AbstractProxoolTest
23: */
24: public DelegateConnectionTest(String alias) {
25: super (alias);
26: }
27:
28: /**
29: * Get a connection and cast it into the appropriate interface
30: */
31: public void testDelegateConnection() throws Exception {
32: String alias = "delegateConnection";
33: String url = TestHelper.buildProxoolUrl(alias,
34: TestConstants.HYPERSONIC_DRIVER,
35: TestConstants.HYPERSONIC_TEST_URL);
36: Properties info = new Properties();
37: info.setProperty(ProxoolConstants.USER_PROPERTY,
38: TestConstants.HYPERSONIC_USER);
39: info.setProperty(ProxoolConstants.PASSWORD_PROPERTY,
40: TestConstants.HYPERSONIC_PASSWORD);
41: Connection c1 = DriverManager.getConnection(url, info);
42: // TODO cast the connection into the appropriate *interface* and see if it works.
43: c1.close();
44: }
45:
46: }
47: /*
48: Revision history:
49: $Log: DelegateConnectionTest.java,v $
50: Revision 1.1 2004/03/23 21:14:24 billhorsman
51: new tests
52:
53: */
|