01: /*-------------------------------------------------------------------------
02: *
03: * Copyright (c) 2004-2005, PostgreSQL Global Development Group
04: *
05: * IDENTIFICATION
06: * $PostgreSQL: pgjdbc/org/postgresql/test/jdbc2/optional/SimpleDataSourceTest.java,v 1.8 2005/01/11 08:25:48 jurka Exp $
07: *
08: *-------------------------------------------------------------------------
09: */
10: package org.postgresql.test.jdbc2.optional;
11:
12: import org.postgresql.test.TestUtil;
13: import org.postgresql.jdbc2.optional.SimpleDataSource;
14:
15: /**
16: * Performs the basic tests defined in the superclass. Just adds the
17: * configuration logic.
18: *
19: * @author Aaron Mulder (ammulder@chariotsolutions.com)
20: */
21: public class SimpleDataSourceTest extends BaseDataSourceTest {
22: /**
23: * Constructor required by JUnit
24: */
25: public SimpleDataSourceTest(String name) {
26: super (name);
27: }
28:
29: /**
30: * Creates and configures a new SimpleDataSource.
31: */
32: protected void initializeDataSource() {
33: if (bds == null) {
34: bds = new SimpleDataSource();
35: bds.setServerName(TestUtil.getServer());
36: bds.setPortNumber(TestUtil.getPort());
37: bds.setDatabaseName(TestUtil.getDatabase());
38: bds.setUser(TestUtil.getUser());
39: bds.setPassword(TestUtil.getPassword());
40: bds.setPrepareThreshold(TestUtil.getPrepareThreshold());
41: }
42: }
43: }
|