1 /************************************************************************* |
|
2 /* DriverManagerTest.java - Test java.sql.DriverManager |
|
3 /* |
|
4 /* Copyright (c) 2003 Dalibor Topic (robilad@yahoo.de) |
|
5 /* |
|
6 /* This program is free software; you can redistribute it and/or modify |
|
7 /* it under the terms of the GNU General Public License as published |
|
8 /* by the Free Software Foundation, either version 2 of the License, or |
|
9 /* (at your option) any later version. |
|
10 /* |
|
11 /* This program is distributed in the hope that it will be useful, but |
|
12 /* WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 /* GNU General Public License for more details. |
|
15 /* |
|
16 /* You should have received a copy of the GNU General Public License |
|
17 /* along with this program; if not, write to the Free Software Foundation |
|
18 /* Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307 USA |
|
19 /*************************************************************************/ |
|
20 |
|
21 // Tags: JDK1.2 |
|
22 |
|
23 package gnu.testlet.java.sql.DriverManager; |
|
24 |
|
25 import gnu.testlet.Testlet; |
|
26 import gnu.testlet.TestHarness; |
|
27 |
|
28 import java.sql.*; |
|
29 |
|
30 public class DriverManagerTest implements Testlet |
|
31 { |
|
32 |
|
33 public void |
|
34 test(TestHarness harness) |
|
35 { |
|
36 try { |
|
37 DriverManager.getDriver("NoSuchDriver"); |
|
38 harness.check(false, "getDriver"); |
|
39 } |
|
40 catch (SQLException e) { |
|
41 harness.check(true, "getDriver"); |
|
42 } |
|
43 } |
|
44 } |
|