org.logicalcobwebs.proxool
Class ConnectionListenerTest

java.lang.Object
  extended by TestCase
      extended by org.logicalcobwebs.proxool.AbstractProxoolTest
          extended by org.logicalcobwebs.proxool.ConnectionListenerTest

public class ConnectionListenerTest
extends AbstractProxoolTest

Test that registering a ConnectionListenerIF with the ProxoolFacade works.

Since:
Proxool 0.7
Version:
$Revision: 1.13 $, $Date: 2004/06/02 20:04:00 $
Author:
Christian Nedregaard (christian_nedregaard@email.com), $Author: billhorsman $ (current maintainer)

Nested Class Summary
(package private)  class ConnectionListenerTest.TestConnectionListener
           
 
Field Summary
private static Log LOG
           
private  int onBirthCalls
           
private  int onDeathCalls
           
private  int onExecuteCalls
           
private  int onFailCalls
           
 
Constructor Summary
ConnectionListenerTest(java.lang.String s)
           
 
Method Summary
private  void clear()
           
 void testAddConnectionListener()
          Test that multiple connection listeners can be added through ProxoolFacade, and that they get the expected events.
 void testExecuteCommand()
          See whether the command parameter passed to ConnectionListenerIF.onFail(java.lang.String, java.lang.Exception) is correct.
 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
setUp, tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final Log LOG

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:
junit.framework.TestCase#TestCase
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.

testExecuteCommand

public void testExecuteCommand()
                        throws java.lang.Exception
See whether the command parameter passed to ConnectionListenerIF.onFail(java.lang.String, java.lang.Exception) is correct. And assume it is also right for onExecute.

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()