01: /*
02: * Copyright 2001-2007 Geert Bevin <gbevin[remove] at uwyn dot com>
03: * Distributed under the terms of either:
04: * - the common development and distribution license (CDDL), v1.0; or
05: * - the GNU Lesser General Public License, v2.1 or later
06: * $Id: TestsuiteDatabaseContentStores.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.cmf.dam.contentstores;
09:
10: import com.uwyn.rife.TestCaseServerside;
11: import com.uwyn.rife.config.Config;
12: import com.uwyn.rife.database.Datasources;
13:
14: public abstract class TestsuiteDatabaseContentStores extends
15: TestCaseServerside {
16: private String mDatasourceName = null;
17:
18: public TestsuiteDatabaseContentStores(String datasourceName,
19: int siteType, String name) {
20: super (siteType, name);
21:
22: mDatasourceName = datasourceName;
23: }
24:
25: public void setUp() throws Exception {
26: super .setUp();
27:
28: Config.getRepInstance().setParameter("unittestsdatasource",
29: mDatasourceName);
30: }
31:
32: public void tearDown() throws Exception {
33: // reset all the connections since some databases don't support meta data
34: // updates when other connections are active
35: Datasources.getRepInstance().getDatasource(
36: Config.getRepInstance()
37: .getString("unittestsdatasource")).cleanup();
38:
39: Config.getRepInstance().removeParameter("unittestsdatasource");
40:
41: super.tearDown();
42: }
43: }
|