Class PubSubTestCase

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
org.objectweb.jtests.jms.framework.JMSTestCase
org.objectweb.jtests.jms.framework.PubSubTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
TemporaryTopicTest, TopicConnectionTest, TopicSessionTest

public abstract class PubSubTestCase extends JMSTestCase
Creates convenient JMS Publish/Subscribe objects which can be needed for tests.
This class defines the setUp and tearDown methods so that JMS administrated objects and other "ready to use" Pub/Sub objects (that is to say topics, sessions, publishers and subscribers) are available conveniently for the test cases.
Classes which want that convenience should extend PubSubTestCase instead of JMSTestCase.
Version:
$Id: PubSubTestCase.java,v 1.2 2007/06/19 23:32:35 csuconic Exp $
Author:
Jeff Mesnil (jmesnil@gmail.com)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected jakarta.jms.TopicPublisher
    Publisher on queue
    protected jakarta.jms.TopicConnection
    TopicConnection of the publisher
    protected jakarta.jms.TopicSession
    TopicSession of the publisher (non transacted, AUTO_ACKNOWLEDGE)
    protected jakarta.jms.TopicConnectionFactory
    TopicConnectionFactory of the publisher
    protected jakarta.jms.Topic
    Topic used by a publisher
    protected jakarta.jms.TopicSubscriber
    Subscriber on queue
    protected jakarta.jms.TopicConnection
    TopicConnection of the subscriber
    protected jakarta.jms.TopicSession
    TopicSession of the subscriber (non transacted, AUTO_ACKNOWLEDGE)
    protected jakarta.jms.TopicConnectionFactory
    TopicConnectionFactory of the subscriber
    protected jakarta.jms.Topic
    Topic used by a subscriber

    Fields inherited from class org.objectweb.jtests.jms.framework.JMSTestCase

    admin, PROP_FILE_NAME, startServer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Create all administrated objects connections and sessions ready to use for tests.
    protected void
    Close connections and delete administrated objects

    Methods inherited from class org.objectweb.jtests.jms.framework.JMSTestCase

    fail, getProviderProperties

    Methods inherited from class junit.framework.TestCase

    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, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • publisherTopic

      protected jakarta.jms.Topic publisherTopic
      Topic used by a publisher
    • publisher

      protected jakarta.jms.TopicPublisher publisher
      Publisher on queue
    • publisherTCF

      protected jakarta.jms.TopicConnectionFactory publisherTCF
      TopicConnectionFactory of the publisher
    • publisherConnection

      protected jakarta.jms.TopicConnection publisherConnection
      TopicConnection of the publisher
    • publisherSession

      protected jakarta.jms.TopicSession publisherSession
      TopicSession of the publisher (non transacted, AUTO_ACKNOWLEDGE)
    • subscriberTopic

      protected jakarta.jms.Topic subscriberTopic
      Topic used by a subscriber
    • subscriber

      protected jakarta.jms.TopicSubscriber subscriber
      Subscriber on queue
    • subscriberTCF

      protected jakarta.jms.TopicConnectionFactory subscriberTCF
      TopicConnectionFactory of the subscriber
    • subscriberConnection

      protected jakarta.jms.TopicConnection subscriberConnection
      TopicConnection of the subscriber
    • subscriberSession

      protected jakarta.jms.TopicSession subscriberSession
      TopicSession of the subscriber (non transacted, AUTO_ACKNOWLEDGE)
  • Constructor Details

    • PubSubTestCase

      public PubSubTestCase(String name)
  • Method Details

    • setUp

      protected void setUp() throws Exception
      Create all administrated objects connections and sessions ready to use for tests.
      Start connections.
      Overrides:
      setUp in class JMSTestCase
      Throws:
      Exception
    • tearDown

      protected void tearDown() throws Exception
      Close connections and delete administrated objects
      Overrides:
      tearDown in class JMSTestCase
      Throws:
      Exception