Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

junit.extensions
Class RepeatedTest  view RepeatedTest download RepeatedTest.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.extensions.TestDecorator
          extended byjunit.extensions.RepeatedTest
All Implemented Interfaces:
junit.framework.Test

public class RepeatedTest
extends TestDecorator

A Decorator that runs a test repeatedly.


Field Summary
private  int fTimesRepeat
           
 
Fields inherited from class junit.extensions.TestDecorator
fTest
 
Constructor Summary
RepeatedTest(junit.framework.Test test, int repeat)
           
 
Method Summary
 int countTestCases()
          Counts the number of test cases that will be run by this test.
 void run(junit.framework.TestResult result)
          Runs a test and collects its result in a TestResult instance.
 java.lang.String toString()
          Convert this Object to a human-readable String.
 
Methods inherited from class junit.extensions.TestDecorator
basicRun, getTest
 
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
 

Field Detail

fTimesRepeat

private int fTimesRepeat
Constructor Detail

RepeatedTest

public RepeatedTest(junit.framework.Test test,
                    int repeat)
Method Detail

countTestCases

public int countTestCases()
Description copied from interface: junit.framework.Test
Counts the number of test cases that will be run by this test.

Specified by:
countTestCases in interface junit.framework.Test
Overrides:
countTestCases in class TestDecorator

run

public void run(junit.framework.TestResult result)
Description copied from interface: junit.framework.Test
Runs a test and collects its result in a TestResult instance.

Specified by:
run in interface junit.framework.Test
Overrides:
run in class TestDecorator

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Convert this Object to a human-readable String. There are no limits placed on how long this String should be or what it should contain. We suggest you make it as intuitive as possible to be able to place it into System.out.println() 55 and such.

It is typical, but not required, to ensure that this method never completes abruptly with a java.lang.RuntimeException.

This method will be called when performing string concatenation with this object. If the result is null, string concatenation will instead use "null".

The default implementation returns getClass().getName() + "@" + Integer.toHexString(hashCode()).

Overrides:
toString in class TestDecorator