org.exolab.jmscts.core
Class ProviderTestRunner

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

public class ProviderTestRunner
extends TestRunner

This class enables generic connection factory test cases to be run for each JMS provider.

Test cases must implement the ConnectionFactoryTestCase interface.

Version:
$Revision: 1.6 $ $Date: 2004/01/31 13:44:24 $
Author:
Tim Anderson
See Also:
ConnectionTestCase, JMSTestRunner, Provider

Fields inherited from class junit.extensions.TestDecorator
fTest
 
Constructor Summary
ProviderTestRunner(junit.framework.Test test)
          Construct an instance with the test case to run.
 
Method Summary
protected  void runTest(junit.framework.Test test, junit.framework.TestResult result)
          Runs a test case against each supported connection type
 void setProvider(ProviderLoader provider)
          Set the provider loader This must be invoked prior to running the test case.
protected  void setUp()
          Initialises the provider
protected  void tearDown()
          Cleans up after the test case has been run
 
Methods inherited from class org.exolab.jmscts.core.TestRunner
basicRun, checkImplements, getChildContext, getContext, getFilter, getTests, setChildContext, setContext, setFilter, share
 
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 junit.framework.Test
countTestCases, run
 

Constructor Detail

ProviderTestRunner

public ProviderTestRunner(junit.framework.Test test)
Construct an instance with the test case to run.
Parameters:
test - the test case to run. The test must implement the ConnectionFactoryTestCase interface, unless it is a TestSuite, where each contained test must implement the ConnectionFactoryTestCase interface.
Method Detail

setProvider

public void setProvider(ProviderLoader provider)
Set the provider loader This must be invoked prior to running the test case.
Parameters:
provider - the provider loader

setUp

protected void setUp()
              throws java.lang.Exception
Initialises the provider
Overrides:
setUp in class junit.extensions.TestSetup
Throws:
java.lang.Exception - if the provider proxy cannot be initialised.

tearDown

protected void tearDown()
                 throws java.lang.Exception
Cleans up after the test case has been run
Overrides:
tearDown in class TestRunner
Throws:
java.lang.Exception - if the provider can't be cleaned up

runTest

protected void runTest(junit.framework.Test test,
                       junit.framework.TestResult result)
Runs a test case against each supported connection type
Overrides:
runTest in class TestRunner
Parameters:
test - the test case
result - the instance to collect test results in


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