Java Code Examples for junit.framework.TestCase#runBare()
The following examples show how to use
junit.framework.TestCase#runBare() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: TestCaseTest.java From cacheonix-core with GNU Lesser General Public License v2.1 | 6 votes |
public void testErrorTearingDownDoesntMaskErrorRunning() { final Exception running= new Exception("Running"); TestCase t= new TestCase() { protected void runTest() throws Throwable { throw running; } protected void tearDown() throws Exception { throw new Error("Tearing down"); } }; try { t.runBare(); } catch (Throwable thrown) { assertSame(running, thrown); } }