JUnit-addons
version 1.4

junitx.extensions
Class TestSetup

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.extensions.TestDecorator
              |
              +--junitx.extensions.TestSetup
All Implemented Interfaces:
junit.framework.Test

public class TestSetup
extends junit.extensions.TestDecorator

This class is similar to the junit.extensions.TestSetup class but executes the tearDown method in a finally block. It means that the tearDown method will always be executed.

Version:
$Revision: 1.4 $ $Date: 2003/03/21 06:13:47 $
Author:
Vladimir R. Bossicard

Field Summary
 
Fields inherited from class junit.extensions.TestDecorator
fTest
 
Constructor Summary
TestSetup(junit.framework.Test test)
           
 
Method Summary
 void run(junit.framework.TestResult result)
          Runs a test and collects its result in a TestResult instance.
protected  void setUp()
          Sets up the fixture.
protected  void tearDown()
          Tears down the fixture.
 
Methods inherited from class junit.extensions.TestDecorator
basicRun, countTestCases, getTest, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, 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
 

Constructor Detail

TestSetup

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

run

public void run(junit.framework.TestResult result)
Runs a test and collects its result in a TestResult instance.

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

setUp

protected void setUp()
              throws java.lang.Exception
Sets up the fixture. Override to set up additional fixture state.

java.lang.Exception

tearDown

protected void tearDown()
                 throws java.lang.Exception
Tears down the fixture. Override to tear down the additional fixture state.

java.lang.Exception

JUnit-addons
version 1.4

Copyright © 2002-2003 Vladimir R. Bossicard. All Rights Reserved.