Package junit.extensions
Class TestSetup
- java.lang.Object
-
- junit.framework.Assert
-
- junit.extensions.TestDecorator
-
- junit.extensions.TestSetup
-
- All Implemented Interfaces:
Test
public class TestSetup extends TestDecorator
A Decorator to set up and tear down additional fixture state. Subclass TestSetup and insert it into your tests when you want to set up additional state once before the tests are run.
-
-
Field Summary
-
Fields inherited from class junit.extensions.TestDecorator
fTest
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
run(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
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
-
-
-
-
Method Detail
-
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 interfaceTest
- Overrides:
run
in classTestDecorator
-
setUp
protected void setUp() throws java.lang.Exception
Sets up the fixture. Override to set up additional fixture state.- Throws:
java.lang.Exception
-
tearDown
protected void tearDown() throws java.lang.Exception
Tears down the fixture. Override to tear down the additional fixture state.- Throws:
java.lang.Exception
-
-