org.objectweb.jtests.jms.framework
Class PubSubTestCase

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

public 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@inrialpes.fr)

Field Summary
protected  javax.jms.TopicPublisher publisher
          Publisher on queue
protected  javax.jms.TopicConnection publisherConnection
          TopicConnection of the publisher
protected  javax.jms.TopicSession publisherSession
          TopicSession of the publisher (non transacted, AUTO_ACKNOWLEDGE)
protected  javax.jms.TopicConnectionFactory publisherTCF
          TopicConnectionFactory of the publisher
protected  javax.jms.Topic publisherTopic
          Topic used by a publisher
protected  javax.jms.TopicSubscriber subscriber
          Subscriber on queue
protected  javax.jms.TopicConnection subscriberConnection
          TopicConnection of the subscriber
protected  javax.jms.TopicSession subscriberSession
          TopicSession of the subscriber (non transacted, AUTO_ACKNOWLEDGE)
protected  javax.jms.TopicConnectionFactory subscriberTCF
          TopicConnectionFactory of the subscriber
protected  javax.jms.Topic subscriberTopic
          Topic used by a subscriber
 
Constructor Summary
PubSubTestCase(java.lang.String name)
           
 
Method Summary
protected  void setUp()
          Create all administrated objects connections and sessions ready to use for tests.
protected  void tearDown()
          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
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString
 
Methods inherited from class junit.framework.Assert
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, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

publisherTopic

protected javax.jms.Topic publisherTopic
Topic used by a publisher


publisher

protected javax.jms.TopicPublisher publisher
Publisher on queue


publisherTCF

protected javax.jms.TopicConnectionFactory publisherTCF
TopicConnectionFactory of the publisher


publisherConnection

protected javax.jms.TopicConnection publisherConnection
TopicConnection of the publisher


publisherSession

protected javax.jms.TopicSession publisherSession
TopicSession of the publisher (non transacted, AUTO_ACKNOWLEDGE)


subscriberTopic

protected javax.jms.Topic subscriberTopic
Topic used by a subscriber


subscriber

protected javax.jms.TopicSubscriber subscriber
Subscriber on queue


subscriberTCF

protected javax.jms.TopicConnectionFactory subscriberTCF
TopicConnectionFactory of the subscriber


subscriberConnection

protected javax.jms.TopicConnection subscriberConnection
TopicConnection of the subscriber


subscriberSession

protected javax.jms.TopicSession subscriberSession
TopicSession of the subscriber (non transacted, AUTO_ACKNOWLEDGE)

Constructor Detail

PubSubTestCase

public PubSubTestCase(java.lang.String name)
Method Detail

setUp

protected void setUp()
Create all administrated objects connections and sessions ready to use for tests.
Start connections.

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Close connections and delete administrated objects

Overrides:
tearDown in class junit.framework.TestCase


Copyright © 2010 JBoss, A division of Red Hat. All Rights Reserved.