org.jboss.jrunit.decorators
Class JunitLoopDecorator

java.lang.Object
  extended byorg.jboss.jrunit.decorators.JunitLoopDecorator
All Implemented Interfaces:
java.lang.Runnable, junit.framework.Test

public class JunitLoopDecorator
extends java.lang.Object
implements junit.framework.Test, java.lang.Runnable

Decorates a testcase with a number of loops. $Id: JunitLoopDecorator.java,v 1.6 2005/10/17 17:05:59 msurtani Exp $

Author:
Clebert Suconic

Constructor Summary
JunitLoopDecorator(java.lang.String loopName, java.lang.Class testClazz, int loops, long timeWait)
           
JunitLoopDecorator(java.lang.String loopName, java.lang.Class testClazz, int loops, long timeWait, ThreadListener threadSynchronizer)
           
JunitLoopDecorator(java.lang.String loopName, java.lang.Class testClazz, int loops, long timeWait, ThreadListener threadSynchronizer, junit.framework.TestResult result)
           
 
Method Summary
 int countTestCases()
           
 junit.framework.TestResult getResult()
           
 junit.framework.TestCase getTestCase()
           
 junit.framework.Test getTestDecorated()
          Returns the Test created by this decorator
 void loopSetup()
          Called before starting threads
 void loopTearDown()
          Called when all threads have been finished
 void run()
           
 void run(junit.framework.TestResult run)
          Runs the test.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JunitLoopDecorator

public JunitLoopDecorator(java.lang.String loopName,
                          java.lang.Class testClazz,
                          int loops,
                          long timeWait)

JunitLoopDecorator

public JunitLoopDecorator(java.lang.String loopName,
                          java.lang.Class testClazz,
                          int loops,
                          long timeWait,
                          ThreadListener threadSynchronizer)

JunitLoopDecorator

public JunitLoopDecorator(java.lang.String loopName,
                          java.lang.Class testClazz,
                          int loops,
                          long timeWait,
                          ThreadListener threadSynchronizer,
                          junit.framework.TestResult result)
Method Detail

countTestCases

public int countTestCases()
Specified by:
countTestCases in interface junit.framework.Test

getTestDecorated

public junit.framework.Test getTestDecorated()
Returns the Test created by this decorator


run

public void run(junit.framework.TestResult run)
Runs the test.

Specified by:
run in interface junit.framework.Test

run

public void run()
Specified by:
run in interface java.lang.Runnable

getResult

public junit.framework.TestResult getResult()

getTestCase

public junit.framework.TestCase getTestCase()

loopSetup

public void loopSetup()
Called before starting threads


loopTearDown

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



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