|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | POINTCUT | FIELD | CONSTRUCTOR | METHOD | DETAIL: FIELD | POINTCUT | CONSTRUCTOR | METHOD |
java.lang.Object | +--junit.framework.Assert | +--junit.extensions.TestDecorator | +--net.walend.toolkit.junit.TestSetup
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.
Unlike TestSetup, this class calls tearDown inside a finally block; tearDown will be called unless there's a real disaster. This change helps insure that all of the setup is unwound after a test. It cleans up resources that live longer than the test in the event of setUp and testing problems.
Inner Class/Aspect Summary | |
private class |
TestSetup.HardenedProtectable
HardenedProtectable runs the setUp() and basicRun() inside a try block. |
Fields inherited from class junit.extensions.TestDecorator |
fTest |
Constructor Summary | |
TestSetup(Test test)
|
Method Summary | |
void |
run(TestResult result)
|
protected abstract void |
setUp()
Sets up the fixture. |
protected abstract 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, failNotEquals, failNotSame |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait |
Constructor Detail |
public TestSetup(Test test)
Method Detail |
public void run(TestResult result)
protected abstract void setUp() throws java.lang.Exception
protected abstract void tearDown() throws java.lang.Exception
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTRUCTOR | METHOD | DETAIL: FIELD | CONSTRUCTOR | METHOD |