(t *testing.T)
| 2122 | } |
| 2123 | |
| 2124 | func Test_MockMethodCalled_Panic(t *testing.T) { |
| 2125 | t.Parallel() |
| 2126 | |
| 2127 | m := new(Mock) |
| 2128 | m.On("foo", "hello").Panic("world panics") |
| 2129 | |
| 2130 | require.PanicsWithValue(t, "world panics", func() { m.MethodCalled("foo", "hello") }) |
| 2131 | m.AssertExpectations(t) |
| 2132 | } |
| 2133 | |
| 2134 | // Test to validate fix for racy concurrent call access in MethodCalled() |
| 2135 | func Test_MockReturnAndCalledConcurrent(t *testing.T) { |
nothing calls this directly
no test coverage detected