Panic specifies if the function call should fail and the panic message Mock.On("DoSomething").Panic("test panic")
(msg string)
| 118 | // |
| 119 | // Mock.On("DoSomething").Panic("test panic") |
| 120 | func (c *Call) Panic(msg string) *Call { |
| 121 | c.lock() |
| 122 | defer c.unlock() |
| 123 | |
| 124 | c.PanicMsg = &msg |
| 125 | |
| 126 | return c |
| 127 | } |
| 128 | |
| 129 | // Once indicates that the mock should only return the value once. |
| 130 | // |