Class ConnectionTest

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
All Implemented Interfaces:
junit.framework.Test

public class ConnectionTest extends PTPTestCase
Test connections. See JMS specifications, sec. 4.3.5 Closing a Connection
Version:
$Id: ConnectionTest.java,v 1.2 2007/06/15 20:55:20 csuconic Exp $
Author:
Jeff Mesnil (jmesnil@gmail.com)
  • Constructor Details

    • ConnectionTest

      public ConnectionTest(String name)
  • Method Details

    • testAcknowledge

      public void testAcknowledge()
      Test that invoking the acknowledge() method of a received message from a closed connection's session must throw an IllegalStateException.
    • testUseClosedConnection

      public void testUseClosedConnection()
      Test that an attempt to use a Connection which has been closed throws a jakarta.jms.IllegalStateException.
    • testMessageSentWhenConnectionClosed

      public void testMessageSentWhenConnectionClosed()
      Test that a MessageProducer can send messages while a Connection is stopped.
    • testCloseClosedConnection

      public void testCloseClosedConnection()
      Test that closing a closed connectiondoes not throw an exception.
    • testStartStartedConnection

      public void testStartStartedConnection()
      Test that starting a started connection is ignored
    • testStopStoppedConnection

      public void testStopStoppedConnection()
      Test that stopping a stopped connection is ignored
    • testStopConsumerConnection

      public void testStopConsumerConnection()
      Test that delivery of message is stopped if the message consumer connection is stopped
    • suite

      public static junit.framework.Test suite()
      Method to use this class in a Test suite