org.exolab.jmscts.core
Class SessionTestRunner

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.extensions.TestDecorator
              |
              +--junit.extensions.TestSetup
                    |
                    +--org.exolab.jmscts.core.TestRunner
                          |
                          +--org.exolab.jmscts.core.SessionTestRunner
All Implemented Interfaces:
ConnectionFactoryTestCase, ConnectionTestCase, JMSTest, junit.framework.Test

public class SessionTestRunner
extends TestRunner
implements ConnectionTestCase

This class enables generic session test cases to be run for each JMS session type.

Test cases must implement the SessionTestCase interface.

Version:
$Revision: 1.3 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson
See Also:
SessionTestCase, ConnectionTestCase, ConnectionTestRunner

Fields inherited from class junit.extensions.TestDecorator
fTest
 
Constructor Summary
SessionTestRunner(SessionTestCase test)
          Construct an instance with the test case to run.
 
Method Summary
 ConnectionFactoryTypes getConnectionFactoryTypes()
          Get the connection factory types to test against
protected  void runTest(junit.framework.Test test, junit.framework.TestResult result)
          Runs the test case against sessions for each of the acknowledgement types specified by the test.
 boolean setClientID()
          Returns true if the client identifier should be set on the connection.
protected  void setUp()
          Creates the session, prior to running the test case
 boolean startConnection()
          Returns true if the connection should be started prior to running the test.
 
Methods inherited from class org.exolab.jmscts.core.TestRunner
basicRun, checkImplements, getChildContext, getContext, getFilter, getTests, setChildContext, setContext, setFilter, share, tearDown
 
Methods inherited from class junit.extensions.TestSetup
run
 
Methods inherited from class junit.extensions.TestDecorator
countTestCases, getTest, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.exolab.jmscts.core.JMSTest
getContext, setContext, share
 
Methods inherited from interface junit.framework.Test
countTestCases, run
 

Constructor Detail

SessionTestRunner

public SessionTestRunner(SessionTestCase test)
Construct an instance with the test case to run.
Parameters:
test - the test case to run
Method Detail

getConnectionFactoryTypes

public ConnectionFactoryTypes getConnectionFactoryTypes()
Get the connection factory types to test against
Specified by:
getConnectionFactoryTypes in interface ConnectionFactoryTestCase
Returns:
the connection factory types to test against

startConnection

public boolean startConnection()
Returns true if the connection should be started prior to running the test.
Specified by:
startConnection in interface ConnectionTestCase
Returns:
true if the connection should be started, false if it should be stopped

setClientID

public boolean setClientID()
Returns true if the client identifier should be set on the connection. This is only applicable for TopicConnection instances, and will be ignored for QueueConnection instances.
Specified by:
setClientID in interface ConnectionTestCase
Returns:
true if an identifier should be allocated to the connection

runTest

protected void runTest(junit.framework.Test test,
                       junit.framework.TestResult result)
Runs the test case against sessions for each of the acknowledgement types specified by the test.
Overrides:
runTest in class TestRunner
Parameters:
test - the test case to run
result - the instance to collect results in

setUp

protected void setUp()
              throws java.lang.Exception
Creates the session, prior to running the test case
Overrides:
setUp in class junit.extensions.TestSetup
Throws:
java.lang.Exception - if the session cannot be created, or the test case does not implement the SessionTestCase interface


Copyright © 2001-2004 JMS CTS Team. All Rights Reserved.