org.jboss.jrunit.decorators
Class ThreadLocalDecorator

java.lang.Object
  extended byjunit.framework.TestSuite
      extended byorg.jboss.jrunit.decorators.JunitThreadDecorator
          extended byorg.jboss.jrunit.decorators.ThreadLocalDecorator
All Implemented Interfaces:
junit.framework.Test, ThreadListener

public class ThreadLocalDecorator
extends JunitThreadDecorator

Author:
Clebert Suconic

Constructor Summary
ThreadLocalDecorator(java.lang.Class testClazz, int loops)
          Creates a decorator which will only use 1 thread, no wait, and will use JGropus sender, and will start the receiverConsole.
ThreadLocalDecorator(java.lang.Class testClazz, int numberOfThreads, int loops)
           
ThreadLocalDecorator(java.lang.Class testClazz, int numberOfThreads, int loops, long timeWait, boolean broadcastResults)
           
 
Method Summary
 void threadsSetup()
          Called before starting threads
 void threadsTearDown()
          Called when all threads have been finished
 
Methods inherited from class org.jboss.jrunit.decorators.JunitThreadDecorator
countTestCases, run, testAt, threadFinished, waitForFinishedThreads
 
Methods inherited from class junit.framework.TestSuite
addTest, addTestSuite, createTest, getName, getTestConstructor, runTest, setName, testCount, tests, toString, warning
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ThreadLocalDecorator

public ThreadLocalDecorator(java.lang.Class testClazz,
                            int numberOfThreads,
                            int loops,
                            long timeWait,
                            boolean broadcastResults)
Parameters:
testClazz -
numberOfThreads -
loops -
timeWait -
broadcastResults - The receiverConsole can be started externally

ThreadLocalDecorator

public ThreadLocalDecorator(java.lang.Class testClazz,
                            int numberOfThreads,
                            int loops)
Parameters:
testClazz -
numberOfThreads -
loops -

ThreadLocalDecorator

public ThreadLocalDecorator(java.lang.Class testClazz,
                            int loops)
Creates a decorator which will only use 1 thread, no wait, and will use JGropus sender, and will start the receiverConsole.

Parameters:
testClazz -
loops -
Method Detail

threadsSetup

public void threadsSetup()
Called before starting threads

Overrides:
threadsSetup in class JunitThreadDecorator

threadsTearDown

public void threadsTearDown()
Called when all threads have been finished

Overrides:
threadsTearDown in class JunitThreadDecorator


JRunit, a JUnit extension for distributed client/server tests.