org.opensubsystems.core.persist.db.driver
Class TimeTest.TimeTestInternal

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.opensubsystems.core.persist.db.DatabaseTest
              extended by org.opensubsystems.core.persist.db.driver.TimeTest.TimeTestInternal
All Implemented Interfaces:
junit.framework.Test
Enclosing class:
TimeTest

public static class TimeTest.TimeTestInternal
extends DatabaseTest

Internal class which can be included in other test suites directly without including the above suite. This allows us to group multiple tests together and the execute the DatabaseTestSetup only once


Field Summary
 
Fields inherited from class org.opensubsystems.core.persist.db.DatabaseTest
DEFAULT_DB_PASSWORD, DEFAULT_DB_USER, DEFAULT_PROPERTY_FILE, m_connection, m_iRequestedConnectionCount, m_transaction
 
Constructor Summary
TimeTest.TimeTestInternal(java.lang.String strTestName)
          Create new time test.
 
Method Summary
 void testBasicTimeSupport()
          Test the database support for Time objects.
 
Methods inherited from class org.opensubsystems.core.persist.db.DatabaseTest
addDataSource, addDataSource, getDataSourceName, setDataSourceName, setUp, tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TimeTest.TimeTestInternal

public TimeTest.TimeTestInternal(java.lang.String strTestName)
Create new time test.

Parameters:
strTestName - - name of the test
Method Detail

testBasicTimeSupport

public void testBasicTimeSupport()
                          throws java.lang.Throwable
Test the database support for Time objects. Time object ignores the date portion of the Java Date. The java.sql.Time requires the date portion of the Time to be set to January 1, 1970 but it doesn't enforces it when using the long contructor therefore allowing us to create time values greater then 24 hours. This class inserts time into database, then retrieve it back using different java date and deletes it using cursor. Uses the already setup connection and transaction. No need to close the connection since base class is doing it for us.

Throws:
java.lang.Throwable - - an error has occured during test


Copyright © 2003 - 2006 OpenSubsystems s.r.o.