## junit.extensions
Class TestDecorator

    java.lang.Object
      junit.framework.Assert
          junit.extensions.TestDecorator

All Implemented Interfaces:
  Test

Direct Known Subclasses:
  RepeatedTest, TestSetup

    public class TestDecorator

extends Assert
implements 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 Test` `fTest`

Constructor Summary
`TestDecorator(Test test)`

Method Summary
`void` `basicRun(TestResult result)` The basic run behaviour.
`int` `countTestCases()` Counts the number of test cases that will be run by this test.
`Test` `getTest()`
`void` `run(TestResult result)` Runs a test and collects its result in a TestResult instance.
`String` `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, failNotEquals, failNotSame, failSame, format`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### fTest

    protected Test fTest

Constructor Detail

### TestDecorator

    public TestDecorator(Test test)

Method Detail

### basicRun

    public void basicRun(TestResult result)

  The basic run behaviour.

### countTestCases

    public int countTestCases()

  Description copied from interface: `Test`
  Counts the number of test cases that will be run by this test.

  Specified by:
    `countTestCases` in interface `Test`

### run

    public void run(TestResult result)

  Description copied from interface: `Test`
  Runs a test and collects its result in a TestResult instance.

  Specified by:
    `run` in interface `Test`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getTest

    public Test getTest()

Copyright © 2002–2020 JUnit. All rights reserved.