Times indicates that the mock should only return the indicated number of times. Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Times(5)
(i int)
| 145 | // |
| 146 | // Mock.On("MyMethod", arg1, arg2).Return(returnArg1, returnArg2).Times(5) |
| 147 | func (c *Call) Times(i int) *Call { |
| 148 | c.lock() |
| 149 | defer c.unlock() |
| 150 | c.Repeatability = i |
| 151 | return c |
| 152 | } |
| 153 | |
| 154 | // WaitUntil sets the channel that will block the mock's return until its closed |
| 155 | // or a message is received. |