com.ail.coretest.configuration
Class TestEJBConfigurationLoader

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

public class TestEJBConfigurationLoader
extends junit.framework.TestCase

JUnit TestCase for the EJBConfigurationLoader.

Version:
$Revision: 1.3 $

Constructor Summary
TestEJBConfigurationLoader(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 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 testSaveConfiguration()
          Test that a sample configuration can be saved.
 void testSaveLoadSaveLoadLoadOldConfiguration()
          Test the history mechanism.
 
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

TestEJBConfigurationLoader

public TestEJBConfigurationLoader(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()
                              throws java.lang.Exception
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.

Throws:
java.lang.Exception

testLoadUndefinedConfiguration

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

Throws:
java.lang.Exception

testSaveConfiguration

public void testSaveConfiguration()
                           throws java.lang.Exception
Test that a sample configuration can be saved.

Throws:
java.lang.Exception

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()
                                              throws java.lang.Exception
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.

Throws:
java.lang.Exception