org.logicalcobwebs.proxool
Class ConnectionListenerTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.logicalcobwebs.proxool.AbstractProxoolTest
              extended byorg.logicalcobwebs.proxool.ConnectionListenerTest
All Implemented Interfaces:
junit.framework.Test

public class ConnectionListenerTest
extends AbstractProxoolTest

Test that registering a ConnectionListenerIF with the ProxoolFacade works.

Since:
Proxool 0.7
Version:
$Revision: 1.11 $, $Date: 2003/03/10 23:31:04 $
Author:
Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)

Nested Class Summary
(package private)  class ConnectionListenerTest.TestConnectionListener
           
 
Field Summary
private  int onBirthCalls
           
private  int onDeathCalls
           
private  int onExecuteCalls
           
private  int onFailCalls
           
 
Fields inherited from class org.logicalcobwebs.proxool.AbstractProxoolTest
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
ConnectionListenerTest(java.lang.String s)
           
 
Method Summary
private  void clear()
           
protected  void setUp()
          Calls AbstractProxoolTest.setUp()
 void testAddConnectionListener()
          Test that multiple connection listeners can be added through ProxoolFacade, and that they get the expected events.
 void testRemoveConnectionListener()
          Test that multiple connection listeners can be added through ProxoolFacade, and then removed, and that they do not receive events after they have been removed.
 
Methods inherited from class org.logicalcobwebs.proxool.AbstractProxoolTest
tearDown
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, 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
 

Field Detail

onBirthCalls

private int onBirthCalls

onDeathCalls

private int onDeathCalls

onExecuteCalls

private int onExecuteCalls

onFailCalls

private int onFailCalls
Constructor Detail

ConnectionListenerTest

public ConnectionListenerTest(java.lang.String s)
See Also:
TestCase.TestCase(java.lang.String)
Method Detail

testAddConnectionListener

public void testAddConnectionListener()
                               throws java.lang.Exception
Test that multiple connection listeners can be added through ProxoolFacade, and that they get the expected events.

Throws:
java.lang.Exception - if the test fails.

testRemoveConnectionListener

public void testRemoveConnectionListener()
                                  throws java.lang.Exception
Test that multiple connection listeners can be added through ProxoolFacade, and then removed, and that they do not receive events after they have been removed.

Throws:
java.lang.Exception - if the test fails.

clear

private void clear()

setUp

protected void setUp()
              throws java.lang.Exception
Calls AbstractProxoolTest.setUp()

Overrides:
setUp in class AbstractProxoolTest
Throws:
java.lang.Exception
See Also:
TestCase.setUp()