« Return to Thread: [jira] Created: (JMOCK-206) Lost test Exception in org.jmock.core.VerifyingTestCase.runBare()

[jira] Created: (JMOCK-206) Lost test Exception in org.jmock.core.VerifyingTestCase.runBare()

by JIRA jira@codehaus.org :: Rate this Message:

Reply to Author | View in Thread

Lost test Exception in org.jmock.core.VerifyingTestCase.runBare()
-----------------------------------------------------------------

                 Key: JMOCK-206
                 URL: http://jira.codehaus.org/browse/JMOCK-206
             Project: jMock
          Issue Type: Bug
          Components: Library
    Affects Versions: 1.2.0
         Environment: Java 1.4
JUnit 3.8.2
            Reporter: Frédéric Rodrigo


In org.jmock.core.VerifyingTestCase

    /* This is virtually a copy/paste of the same invokedMethod in the TestCase class to allow
     * overriding of runTest in the normal manner.
     *
     * @see junit.framework.TestCase#runBare()
     */
    public void runBare() throws Throwable {
        setUp();
        try {
            runTest();
            verify();
        }
        finally {
            tearDown();
        }
    }

Exception appen in text was lost on try (no catch no throw). In super method junit.framework.TestCase.runBare() there is :
        /**
         * Runs the bare test sequence.
         * @exception Throwable if any exception is thrown
         */
        public void runBare() throws Throwable {
                Throwable exception= null;
                setUp();
                try {
                        runTest();
                } catch (Throwable running) {
                        exception= running;
                }
                finally {
                        try {
                                tearDown();
                        } catch (Throwable tearingDown) {
                                if (exception == null) exception= tearingDown;
                        }
                }
                if (exception != null) throw exception;
        }
And here it's take care of test Exception.


--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


 « Return to Thread: [jira] Created: (JMOCK-206) Lost test Exception in org.jmock.core.VerifyingTestCase.runBare()