3
import java.sql.Connection;
4
import java.util.Properties;
5
import javax.sql.DataSource;
6
import junit.framework.TestCase;
9
public class TestDb extends TestCase {
11
public void testDatasource () throws Exception{
13
assertNotNull(DB.datasource);
14
Connection c = DB.datasource.getConnection();
19
public void testNoReload () throws Exception{
21
DataSource ds = DB.datasource;
23
assertSame(DB.datasource, ds);
26
protected void setUp() throws Exception {
27
Properties p = new Properties ();
28
p.setProperty("db.driver", "org.hsqldb.jdbcDriver");
29
p.setProperty("db.url", "jdbc:hsqldb:mem:aname");
30
p.setProperty("db.user", "sa");
31
p.setProperty("db.pass", "");