1   package com.melloware.jukes.db;
2   
3   import org.apache.commons.lang.SystemUtils;
4   
5   import com.melloware.jukes.AbstractTestCase;
6   
7   /**
8    * Test case for Database class.
9    * <p>
10   * Copyright (c) 2006
11   * Melloware, Inc. <http://www.melloware.com>
12   * @author Emil A. Lefkof III <info@melloware.com>
13   * @version 4.0
14   */
15  public class DatabaseTest
16      extends AbstractTestCase {
17  
18      /**
19       * Constructor for DatabaseTest.
20       * @param arg0
21       */
22      public DatabaseTest(String arg0) {
23          super(arg0);
24      }
25  
26      public static void main(String[] args) {
27          junit.textui.TestRunner.run(DatabaseTest.class);
28      }
29  
30      /*
31       * Test method for 'com.melloware.jukes.db.Database.getJdbcURL()'
32       */
33      public final void testGetJdbcURL() {
34          Database.startup(SystemUtils.JAVA_IO_TMPDIR + "db/db", "test");
35          Database.shutdown();
36          String url = Database.getJdbcURL();
37          assertNotNull(url);
38      }
39  
40      /*
41       * Test method for 'com.melloware.jukes.db.Database.setWriteDelay(Connection, String)'
42       */
43      public final void testSetWriteDelay() {
44  
45          // do nothing
46  
47      }
48  
49      /*
50       * Test method for 'com.melloware.jukes.db.Database.shutdown()'
51       */
52      public final void testShutdown() {
53          Database.startup(SystemUtils.JAVA_IO_TMPDIR + "db/db", "test");
54          Database.shutdown();
55  
56      }
57  
58      /*
59       * Test method for 'com.melloware.jukes.db.Database.startup(String)'
60       */
61      public final void testStartup() {
62          Database.startup(SystemUtils.JAVA_IO_TMPDIR + "db/db", "test");
63          Database.shutdown();
64  
65      }
66  
67      /*
68       * @see TestCase#setUp()
69       */
70      protected void setUp()
71                    throws Exception {
72          super.setUp();
73      }
74  
75      /*
76       * @see TestCase#tearDown()
77       */
78      protected void tearDown()
79                       throws Exception {
80          super.tearDown();
81      }
82  
83  }