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

Quick Search    Search Deep

junit.extensions
Class TestDecorator  view TestDecorator download TestDecorator.java

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.extensions.TestDecorator
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
RepeatedTest, TestSetup

public class TestDecorator
extends junit.framework.Assert
implements junit.framework.Test

A Decorator for Tests. Use TestDecorator as the base class for defining new test decorators. Test decorator subclasses can be introduced to add behaviour before or after a test is run.


Field Summary
protected  junit.framework.Test fTest
           
 
Constructor Summary
TestDecorator(junit.framework.Test test)
           
 
Method Summary
 void basicRun(junit.framework.TestResult result)
          The basic run behaviour.
 int countTestCases()
          Counts the number of test cases that will be run by this test.
 junit.framework.Test getTest()
           
 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.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

fTest

protected junit.framework.Test fTest
Constructor Detail

TestDecorator

public TestDecorator(junit.framework.Test test)
Method Detail

basicRun

public void basicRun(junit.framework.TestResult result)
The basic run behaviour.


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

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

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()).


getTest

public junit.framework.Test getTest()