org.objectweb.jtests.jms.framework
Class UnifiedTestCase

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.UnifiedTestCase
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
UnifiedSessionTest

public class UnifiedTestCase
extends JMSTestCase

Creates convenient Unified JMS 1.1 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" JMS objects (that is to say destinations, sessions, producers and consumers) are available conveniently for the test cases.
Classes which want that convenience should extend UnifiedTestCase instead of JMSTestCase.

Since:
JMS 1.1
Version:
$Id: UnifiedTestCase.java,v 1.1 2007/03/29 04:28:35 starksm Exp $
Author:
Jeff Mesnil (jmesnil@inrialpes.fr)

Field Summary
protected  Admin admin
           
protected  javax.jms.MessageConsumer consumer
          Consumer on destination
protected  javax.jms.ConnectionFactory consumerCF
          ConnectionFactory of the consumer
protected  javax.jms.Connection consumerConnection
          Connection of the consumer
protected  javax.jms.Destination consumerDestination
          Destination used by a consumer
protected  javax.jms.Session consumerSession
          Session of the consumer (non transacted, AUTO_ACKNOWLEDGE)
protected  javax.naming.InitialContext ctx
           
protected  javax.jms.MessageProducer producer
          Producer
protected  javax.jms.ConnectionFactory producerCF
          ConnectionFactory of the producer
protected  javax.jms.Connection producerConnection
          Connection of the producer
protected  javax.jms.Destination producerDestination
          Destination used by a producer
protected  javax.jms.Session producerSession
          Session of the producer (non transacted, AUTO_ACKNOWLEDGE)
protected  javax.jms.Queue queue
          Queue
protected  javax.jms.QueueConnectionFactory queueConnectionFactory
          QueueConnectionFactory
protected  javax.jms.Topic topic
          Topic
protected  javax.jms.TopicConnectionFactory topicConnectionFactory
          TopicConnectionFactory
 
Constructor Summary
UnifiedTestCase(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

admin

protected Admin admin

ctx

protected javax.naming.InitialContext ctx

producerDestination

protected javax.jms.Destination producerDestination
Destination used by a producer


producer

protected javax.jms.MessageProducer producer
Producer


producerCF

protected javax.jms.ConnectionFactory producerCF
ConnectionFactory of the producer


producerConnection

protected javax.jms.Connection producerConnection
Connection of the producer


producerSession

protected javax.jms.Session producerSession
Session of the producer (non transacted, AUTO_ACKNOWLEDGE)


consumerDestination

protected javax.jms.Destination consumerDestination
Destination used by a consumer


consumer

protected javax.jms.MessageConsumer consumer
Consumer on destination


consumerCF

protected javax.jms.ConnectionFactory consumerCF
ConnectionFactory of the consumer


consumerConnection

protected javax.jms.Connection consumerConnection
Connection of the consumer


consumerSession

protected javax.jms.Session consumerSession
Session of the consumer (non transacted, AUTO_ACKNOWLEDGE)


queueConnectionFactory

protected javax.jms.QueueConnectionFactory queueConnectionFactory
QueueConnectionFactory


queue

protected javax.jms.Queue queue
Queue


topicConnectionFactory

protected javax.jms.TopicConnectionFactory topicConnectionFactory
TopicConnectionFactory


topic

protected javax.jms.Topic topic
Topic

Constructor Detail

UnifiedTestCase

public UnifiedTestCase(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.