net.walend.toolkit.junit
Class TestSetup.HardenedProtectable
java.lang.Object
|
+--net.walend.toolkit.junit.TestSetup.HardenedProtectable
- All Implemented Interfaces:
- junit.framework.Protectable
- Enclosing class:
- TestSetup
- private class TestSetup.HardenedProtectable
- extends java.lang.Object
- implements junit.framework.Protectable
HardenedProtectable runs the setUp() and basicRun() inside a try block. A catch(Exception)
reports any Exceptions as errors to the result. Then HardenedProtectable runs tearDown()
inside a finally block.
Note that catch(Exception ex) will catch RunTimeExceptions, but will not catch Errors.
Field Summary |
private junit.framework.TestResult |
result
|
private junit.framework.Test |
test
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
test
private junit.framework.Test test
result
private junit.framework.TestResult result
TestSetup.HardenedProtectable
TestSetup.HardenedProtectable(junit.framework.Test test,
junit.framework.TestResult result)
protect
public void protect()
throws java.lang.Exception
- Specified by:
protect
in interface junit.framework.Protectable
Copyright (c) 2000, 2001, David Walend