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: TestDatabaseSchedulerInstallation.java 3634 2007-01-08 21:42:24Z gbevin $
07: */
08: package com.uwyn.rife.scheduler.schedulermanagers;
09:
10: import junit.framework.TestCase;
11:
12: import com.uwyn.rife.database.Datasource;
13: import com.uwyn.rife.scheduler.exceptions.SchedulerManagerException;
14: import com.uwyn.rife.tools.ExceptionUtils;
15:
16: public class TestDatabaseSchedulerInstallation extends TestCase {
17: private Datasource mDatasource = null;
18:
19: public TestDatabaseSchedulerInstallation(Datasource datasource,
20: String datasourceName, String name) {
21: super (name);
22: mDatasource = datasource;
23: }
24:
25: public void testInstantiateSchedulerManager() {
26: DatabaseScheduler manager = DatabaseSchedulerFactory
27: .getInstance(mDatasource);
28: assertNotNull(manager);
29: }
30:
31: public void testInstall() {
32: DatabaseScheduler manager = DatabaseSchedulerFactory
33: .getInstance(mDatasource);
34:
35: try {
36: assertTrue(true == manager.install());
37: } catch (SchedulerManagerException e) {
38: assertTrue(ExceptionUtils.getExceptionStackTrace(e), false);
39: }
40: }
41:
42: public void testRemove() {
43: DatabaseScheduler manager = DatabaseSchedulerFactory
44: .getInstance(mDatasource);
45:
46: try {
47: assertTrue(true == manager.remove());
48: } catch (SchedulerManagerException e) {
49: assertTrue(ExceptionUtils.getExceptionStackTrace(e), false);
50: }
51: }
52: }
|