KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > triactive > jdo > test > DatabaseTestCase


1 /*
2  * Copyright 2002 (C) TJDO.
3  * All rights reserved.
4  *
5  * This software is distributed under the terms of the TJDO License version 1.0.
6  * See the terms of the TJDO License in the documentation provided with this software.
7  *
8  * $Id: DatabaseTestCase.java,v 1.3 2002/11/08 05:06:27 jackknifebarber Exp $
9  */

10
11 package com.triactive.jdo.test;
12
13 import com.triactive.jdo.DatabaseProperties;
14 import junit.framework.TestCase;
15
16
17 /**
18  * Abstract base class for all JDO unit tests needing access to a database.
19  * Provides database connection parameters acquired from system properties.
20  *
21  * @author <a HREF="mailto:mmartin5@austin.rr.com">Mike Martin</a>
22  * @version $Revision: 1.3 $
23  */

24
25 public abstract class DatabaseTestCase
26   extends TestCase
27   implements DatabaseProperties
28 {
29     /*
30     static
31     {
32         try
33         {
34             java.sql.DriverManager.setLogStream(new java.io.PrintStream(new java.io.FileOutputStream("jdbc.log")));
35         }
36         catch (java.io.IOException e)
37         {
38             throw new RuntimeException(e.toString());
39         }
40     }
41     */

42
43
44     /**
45      * Used by the JUnit framework to construct tests. Normally, programmers
46      * would never explicitly use this constructor.
47      *
48      * @param name Name of the <tt>TestCase</tt>.
49      */

50
51     public DatabaseTestCase(String JavaDoc name)
52     {
53         super(name);
54     }
55 }
56
Popular Tags