com.ail.coretest.configuration
Class TestJDBCConfigurationLoader

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by com.ail.coretest.configuration.TestJDBCConfigurationLoader
All Implemented Interfaces:
junit.framework.Test

public class TestJDBCConfigurationLoader
extends junit.framework.TestCase

JUnit TestCase.

Version:
$Revision: 1.2 $

Constructor Summary
TestJDBCConfigurationLoader(java.lang.String name)
          Constructs a test case with the given name.
 
Method Summary
static void main(java.lang.String[] args)
           
static junit.framework.Test suite()
           
 void testDoubleCloseDisposition()
          Test the JDBC connections double close disposition.
 void testLoadUndefinedConfiguration()
          Attempt to load an undefined configuration.
 void testLoadWithMissingTable()
          Try to load a configuration when the table does not exist.
 void testSaveAndLoadConfiguration()
          Test that a sample configuration can be saved, and reloaded.
 void testSaveLoadSaveLoadLoadOldConfiguration()
          Test the history mechanism.
 void testWebserviceConfigurationLoader()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, getName, run, run, runBare, 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
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestJDBCConfigurationLoader

public TestJDBCConfigurationLoader(java.lang.String name)
Constructs a test case with the given name.

Method Detail

suite

public static junit.framework.Test suite()

main

public static void main(java.lang.String[] args)

testLoadWithMissingTable

public void testLoadWithMissingTable()
Try to load a configuration when the table does not exist. The JDBC config loader should automatically create the config table if it finds that is does not exist. This test ensures that this is the case.


testLoadUndefinedConfiguration

public void testLoadUndefinedConfiguration()
Attempt to load an undefined configuration. loadConfiguration should throw an 'UnknownNamespaceError' if an attempt is made to load the configuration of an undefined namespace.


testSaveAndLoadConfiguration

public void testSaveAndLoadConfiguration()
                                  throws java.lang.Exception
Test that a sample configuration can be saved, and reloaded.

Throws:
java.lang.Exception

testSaveLoadSaveLoadLoadOldConfiguration

public void testSaveLoadSaveLoadLoadOldConfiguration()
Test the history mechanism. Show that a configuration can be save and loaded, then replaced with a new version, which can also be loaded, and then that the old versions can also be reloaded.


testDoubleCloseDisposition

public void testDoubleCloseDisposition()
                                throws java.lang.Exception
Test the JDBC connections double close disposition. Some drivers object to being told to close a closed connection which is something the JDBCConfigurationLoader does from time to time, this test checks the configured driver to make sure it allows double closing.

Throws:
java.lang.Exception

testWebserviceConfigurationLoader

public void testWebserviceConfigurationLoader()
                                       throws java.lang.Exception
Throws:
java.lang.Exception