net.sourceforge.sqlunit.test
Class ReconnectOnFailureTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by net.sourceforge.sqlunit.test.ReconnectOnFailureTest
All Implemented Interfaces:
junit.framework.Test

public class ReconnectOnFailureTest
extends junit.framework.TestCase

Simulates an exception situation in one of the tests and checks to see if the connection is re-established.

Version:
$Revision: 1.6 $
Author:
Sujit Pal (spal@users.sourceforge.net)

Constructor Summary
ReconnectOnFailureTest(java.lang.String name)
          Boilerplate constructor.
 
Method Summary
static void main(java.lang.String[] argv)
          Boilerplate main method.
static junit.framework.Test suite()
          Boilerplate suite() method.
 void testReconnectOnFail()
          Simulates an exception situation in one of the tests and checks to see if the connection is re-established.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ReconnectOnFailureTest

public ReconnectOnFailureTest(java.lang.String name)
Boilerplate constructor.

Parameters:
name - the name of this test class.
Method Detail

main

public static void main(java.lang.String[] argv)
Boilerplate main method.

Parameters:
argv - the arguments (none).

suite

public static junit.framework.Test suite()
Boilerplate suite() method.

Returns:
a Test object.

testReconnectOnFail

public final void testReconnectOnFail()
                               throws java.lang.Exception
Simulates an exception situation in one of the tests and checks to see if the connection is re-established. The test file for this JUnit test is test/mock/reconnect-test.jml.

Throws:
java.lang.Exception - if there was a problem executing the test.