keeganwitt / gmock

Automatically exported from code.google.com/p/gmock
6 stars 2 forks source link

Should reset after throwing an exception #36

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following test should pass:

    void testShouldResetAfterThrowingException() {
        def mock = mock()
        mock.hashCode().returns(1)

        shouldFail(AssertionFailedError) {
            play {
                mock.toString()
            }
        }

        play {}
    }

Original issue reported on code.google.com by JohnnyJianHY on 11 Dec 2008 at 4:00

GoogleCodeExporter commented 9 years ago
Also this test:

    void testShouldResetAfterThrowingExceptionWhenVerifyFailed() {
        def mock = mock()
        mock.hashCode().returns(1)

        shouldFail(AssertionFailedError) {
            play {}
        }

        play {}
    }

Original comment by JohnnyJianHY on 11 Dec 2008 at 4:05

GoogleCodeExporter commented 9 years ago

Original comment by julien.g...@gmail.com on 13 Dec 2008 at 11:13

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 25 Dec 2008 at 6:27

GoogleCodeExporter commented 9 years ago

Original comment by JohnnyJianHY on 25 Dec 2008 at 6:38